#9455: Undefined local `error` in the LaxOptionParser._process_args method
-------------------------------------+--------------------------------------
          Reporter:  egenix_viktor   |         Owner:  nobody                   
                          
            Status:  new             |     Milestone:                           
                          
         Component:  Core framework  |       Version:  1.0                      
                          
        Resolution:                  |      Keywords:  LaxOptionParser 
_process_args undefined local error
             Stage:  Unreviewed      |     Has_patch:  0                        
                          
        Needs_docs:  0               |   Needs_tests:  0                        
                          
Needs_better_patch:  0               |  
-------------------------------------+--------------------------------------
Changes (by egenix_viktor):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Some debug info to help reproducing it:

 OS: Ubuntu Linux 7.10, but it should be indifferent

 Exception:

 {{{
 NameError: global name 'error' is not defined

 File "/my_app_dir/manage.py", line 11, in <module>
   execute_manager(settings)
 File "/usr/lib/python2.5/site-
 packages/django/core/management/__init__.py", line 340, in execute_manager
   utility.execute()
 File "/usr/lib/python2.5/site-
 packages/django/core/management/__init__.py", line 268, in execute
   options, args = parser.parse_args(self.argv)
 File "/usr/lib/python2.5/optparse.py", line 1378, in parse_args
   stop = self._process_args(largs, rargs, values)
 File "/usr/lib/python2.5/site-
 packages/django/core/management/__init__.py", line 210, in _process_args
   raise error
 }}}

 Variable values at the place of exception:

 {{{
 >>> sys.argv
 ['/my_app_dir/manage.py', 'runserver', '--noreload']

 >>> arg
 '/my_app_dir/manage.py'

 >>> rargs
 ['runserver', '--noreload']
 }}}

 ```NOTE:``` I tried to run my app under Wing IDE with the usual settings
 worked for 0.96. I'm sure I made a mistake. The problem here is not the
 wrong command line, but the undefined `error` variable causing a
 misleading exception.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9455#comment:1>
Django <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