liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

sync_media_s3 ... bug #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. svn co, build and then install django_extensions
2. easy install boto
3. "./manage.py sync_media_s3 --help" 

Errors with optparse:

Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/judgej/lib/python2.5/django/core/management/__init__.py",
line 340, in execute_manager
    utility.execute()
  File "/home/judgej/lib/python2.5/django/core/management/__init__.py",
line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/judgej/lib/python2.5/django/core/management/base.py", line
192, in run_from_argv
    parser = self.create_parser(argv[0], argv[1])
  File "/home/judgej/lib/python2.5/django/core/management/base.py", line
175, in create_parser
    option_list=self.option_list)
  File "/usr/local/lib/python2.5/optparse.py", line 1208, in __init__
    add_help=add_help_option)
  File "/usr/local/lib/python2.5/optparse.py", line 1250, in
_populate_option_list
    self.add_options(option_list)
  File "/usr/local/lib/python2.5/optparse.py", line 1033, in add_options
    self.add_option(option)
  File "/usr/local/lib/python2.5/optparse.py", line 1014, in add_option
    self._check_conflict(option)
  File "/usr/local/lib/python2.5/optparse.py", line 989, in _check_conflict
    option)
optparse.OptionConflictError: option -v/--verbose: conflicting option
string(s): -v

Original issue reported on code.google.com by jud...@gmail.com on 31 Oct 2008 at 3:42

GoogleCodeExporter commented 8 years ago
Which version of the django-command-extensions are you using?  I just tried to 
reproduce this and am not 
getting any conflicts.  I'm using r156.

Original comment by treborhu...@gmail.com on 31 Oct 2008 at 4:49

GoogleCodeExporter commented 8 years ago
django-trunk has a changeset that makes the -v/--verbose option default on all 
commands
which raised the conflict error.

There is a fix for this in the other commands that use the -v option. 

(However they use the django style verbose option that must have an argument 
1,2 or
3. This command uses the more common counting version where instead of having an
explicit argument of the verbosity level one specifies multiple -v / -vv /-vvv 
to
indicate the level of verbosity.)

Original comment by v.oostv...@gmail.com on 3 Nov 2008 at 5:45

GoogleCodeExporter commented 8 years ago
i've committed a fix for this in svn, please check it and reopen the ticket if 
things
are not working properly. thanks for reporting and testing !

Original comment by v.oostv...@gmail.com on 4 Nov 2008 at 9:35