chadwhitacre / aspen-old-google-code-fork

Automatically exported from code.google.com/p/aspen
0 stars 0 forks source link

Undefined variables in config.validate_address() #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 

Validate_address() in config.py has some undefined exception 
variables. See below for an example stacktrace:

F:\code\sandbox\aspen\test>aspen -a 127.0.0.1
Traceback (most recent call last):
  File "c:\Python25\Scripts\aspen", line 7, in <module>
    execfile(__file__)
  File "F:\code\sandbox\aspen\checkout\trunk\bin\aspen", line 3, in 
<module>
    aspen.main()
  File "f:\code\sandbox\aspen\checkout\trunk\src\aspen\__init__.py", line 
234, in main
    config = Configuration(argv)
  File "f:\code\sandbox\aspen\checkout\trunk\src\aspen\config.py", line 
256, in __init__
    self.opts, self.args = self.optparser.parse_args(argv)
  File "C:\Python25\lib\optparse.py", line 1378, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "C:\Python25\lib\optparse.py", line 1422, in _process_args
    self._process_short_opts(rargs, values)
  File "C:\Python25\lib\optparse.py", line 1529, in _process_short_opts
    option.process(opt, value, values, self)
  File "C:\Python25\lib\optparse.py", line 782, in process
    self.action, self.dest, opt, value, values, parser)
  File "C:\Python25\lib\optparse.py", line 802, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "f:\code\sandbox\aspen\checkout\trunk\src\aspen\config.py", line 
118, in cb_address
    sockfam, address = validate_address(value)
  File "f:\code\sandbox\aspen\checkout\trunk\src\aspen\config.py", line 
65, in validate_address
    raise err
NameError: global name 'err' is not defined

F:\code\sandbox\aspen\test>

Original issue reported on code.google.com by mstar...@gmail.com on 10 Dec 2006 at 1:07

GoogleCodeExporter commented 9 years ago
And here is a patch.

Original comment by mstar...@gmail.com on 10 Dec 2006 at 1:10

Attachments:

GoogleCodeExporter commented 9 years ago
changing status so this appears on the default listing

Original comment by whit537@gmail.com on 3 Jan 2007 at 7:38

GoogleCodeExporter commented 9 years ago
I'm about to give config.py a thorough going-over, and will take your feedback 
into
account. Thanks!

Original comment by whit537@gmail.com on 3 Jan 2007 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by whit537@gmail.com on 4 Jan 2007 at 6:57