id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 10080,call_command doesn't take into account command's default options,Alexander Koshelev,Alexander Koshelev,"When I want to use manage.py command from python I must specify all options on which this command is depend. Almost everyone custom command's author write `execute` method something like this: {{{ #!python class Command(BaseCommand): option_list = [make_option(""--some_option"", default=""foobar"")] def execute(self, *args, **options): #... some_option = options[""some_option""] #... }}} And when I call it using `call_command` without `some_option` is specified I get the `KeyError`. But it works fine in command line because `optparse` provides default values. {{{ #!python >>> call_command(""some_command"") Traceback (most recent call last): ... KeyError: 'some_option' }}} Patch solves this inconsistence. ",Bug,closed,Core (Other),dev,Normal,fixed,,,Ready for checkin,1,0,0,0,0,0