#5375: django-admin.py dumpdata fails because it doesn't inherit options_list 
from
BaseCommand
------------------------------------------------------+---------------------
Reporter:  Matthew Flanagan <[EMAIL PROTECTED]>  |       Owner:  nobody         
  Status:  new                                        |   Component:  
django-admin.py
 Version:  SVN                                        |    Keywords:            
     
   Stage:  Unreviewed                                 |   Has_patch:  1         
     
------------------------------------------------------+---------------------
 Running {{{django-admin.py dumpdata}} fails with the following traceback:
 
 {{{
 Traceback (most recent call last):
   File "./manage.py", line 11, in ?
     execute_manager(settings)
   File "/xxx/django/django/core/management/__init__.py", line 163, in
 execute_manager
     utility.execute(argv)
   File "/xxx/django/django/core/management/__init__.py", line 107, in
 execute
     self.fetch_command(command_name, argv[0]).run(argv[1:])
   File "/xxx/django/django/core/management/base.py", line 59, in run
     if options.settings:
 AttributeError: Values instance has no attribute 'settings'
 
 }}}
 
 because it doesn't append its own options to the BaseCommand options_list.
 
 Simple patch is
 {{{
 Index: django/core/management/commands/dumpdata.py
 ===================================================================
 --- django/core/management/commands/dumpdata.py (revision 6080)
 +++ django/core/management/commands/dumpdata.py (working copy)
 @@ -3,7 +3,7 @@
  from optparse import make_option
 
  class Command(BaseCommand):
 -    option_list = (
 +    option_list = BaseCommand.option_list + (
          make_option('--format', default='json', dest='format',
              help='Specifies the output serialization format for
 fixtures'),
          make_option('--indent', default=None, dest='indent', type='int',
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5375>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to