diff --git a/scripts/python-tools.sh b/scripts/python-tools.sh index 8d2e593d..7eeb380b 100644 --- a/scripts/python-tools.sh +++ b/scripts/python-tools.sh @@ -83,12 +83,15 @@ cmd_create_init() done fi - echo - echo "__all__ = [" - for dst_type in ${!seen[@]}; do - echo " \"$dst_type\"," - done - echo "]" + if [ ${#seen[@]} -eq 0 ]; then + echo "__all__ = []" + else + echo "__all__ = [" + for dst_type in ${!seen[@]}; do + echo " \"$dst_type\"," + done + echo "]" + fi echo "# << $del <<" }