Added error message for unknown args. Fixed #2200.
This commit is contained in:
parent
717d346321
commit
aa47ecbf8a
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user