1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed flake8 warning.

This commit is contained in:
Tim Graham 2014-08-13 12:33:18 -04:00
parent 3687aa0093
commit 7f4be9cbc2

View File

@ -104,7 +104,7 @@ def call_command(name, *args, **options):
if command.use_argparse:
# Use the `dest` option name from the parser option
opt_mapping = dict((sorted(s_opt.option_strings)[0].lstrip('-').replace('-', '_'), s_opt.dest)
for s_opt in parser._actions if s_opt.option_strings)
for s_opt in parser._actions if s_opt.option_strings)
arg_options = dict((opt_mapping.get(key, key), value) for key, value in options.items())
defaults = parser.parse_args(args=args)
defaults = dict(defaults._get_kwargs(), **arg_options)