← Back to team overview

openstack-poc team mailing list archive

[Bug 915039] Re: flags.FLAGS( crashes bpython

 

** Changed in: nova
    Milestone: essex-3 => 2012.1

-- 
You received this bug notification because you are a member of OpenStack
Common Drivers, which is the registrant for openstack-common.
https://bugs.launchpad.net/bugs/915039

Title:
  flags.FLAGS( crashes bpython

Status in OpenStack Compute (Nova):
  Fix Released
Status in openstack-common:
  Fix Committed

Bug description:
  Bpython tries to do some fancy stuff like lookup obj.__name__ and
  check for AttributeError.  The code in common/cfg.py has a special
  getattr that raises a non AttributeError exception so it leads to a
  crash and stack trace in bpython:

  Traceback (most recent call last):
    File "/usr/local/share/python/bpython", line 9, in <module>
      load_entry_point('bpython==0.10.1', 'console_scripts', 'bpython')()
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 1756, in main
      banner=banner)
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 1658, in curses_wrapper
      return func(stdscr, *args, **kwargs)
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 1727, in main_curses
      clirepl.repl()
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 1015, in repl
      inp = self.get_line()
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 600, in get_line
      if self.p_key(key) is None:
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 911, in p_key
      self.addstr(key)
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 290, in addstr
      self.complete()
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/cli.py", line 383, in complete
      self.list_win_visible = repl.Repl.complete(self, tab)
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/repl.py", line 540, in complete
      if not self.get_args():
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/repl.py", line 511, in get_args
      self.argspec = inspection.getargspec(func, f)
    File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/bpython/inspection.py", line 229, in getargspec
      func_name = getattr(f, '__name__', None)
    File "nova/flags.py", line 114, in __getattr__
      return getattr(self._conf, name)
    File "nova/common/cfg.py", line 777, in __getattr__
      return self._substitute(self._get(name))
    File "nova/common/cfg.py", line 930, in _get
      info = self._get_opt_info(name, group)
    File "nova/common/cfg.py", line 1010, in _get_opt_info
      raise NoSuchOptError(opt_name, group)
  nova.common.cfg.NoSuchOptError: no such option: __name__

  To test, you do:
  bpython
  then at prompt:
  >>> from nova import flags
  >>> flags.FLAGS(

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/915039/+subscriptions


References