You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/15 17:21:35 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #12375: More proper exit status for failed CLI requests

XD-DENG commented on a change in pull request #12375:
URL: https://github.com/apache/airflow/pull/12375#discussion_r523787185



##########
File path: airflow/cli/commands/variable_command.py
##########
@@ -65,7 +65,7 @@ def variables_import(args):
     if os.path.exists(args.file):
         _import_helper(args.file)
     else:
-        print("Missing variables file.")
+        raise SystemExit("Missing variables file.")

Review comment:
       *Style* consistency will need more effort. For example:
   - with or without prefix "\n\t" are varying among different sub-command-groups (the same raises in `user_command.py` are withOUT this "prefix").
   - some CLI failure are directly throwing "original" Python exceptions.
   
   In this PR I would dedicate on the exit status, if you don't mind.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org