Merge pull request #2853 from normanjaeckel/ManagePy

Added error message for unknown args. Fixed #2200.
This commit is contained in:
Emanuel Schütze 2017-01-14 11:39:17 +01:00 committed by GitHub
commit 8c9bde27fb

View File

@ -36,6 +36,9 @@ def main():
setup_django_settings_module(local_installation=local_installation) setup_django_settings_module(local_installation=local_installation)
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)
else: else:
# Check for unknown_args.
if unknown_args:
parser.error('Unknown arguments {}'.format(' '.join(unknown_args)))
# Run a command that is defined here # Run a command that is defined here
# These are commands that can not rely on an existing settings # These are commands that can not rely on an existing settings
known_args.callback(known_args) known_args.callback(known_args)