Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [114]: conf = cfg.ConfigOpts()
- In [115]: conf.register_opt(cfg.URIOpt('uri', schemes=["http", "https"]),
- ...: cfg.OptGroup(group_name))
- Out[115]: True
- In [116]: conf.register_opt(cfg.URIOpt('uri', schemes=["http", "https"]),
- ...: cfg.OptGroup(group_name))
- ---------------------------------------------------------------------------
- AttributeError Traceback (most recent call last)
- <ipython-input-116-46e0c7fb2a1c> in <module>()
- 1 conf.register_opt(cfg.URIOpt('uri', schemes=["http", "https"]),
- ----> 2 cfg.OptGroup(group_name))
- /home/moguimar/.ve/oslo.config/lib/python2.7/site-packages/oslo_config/cfg.pyc in __inner(self, *args, **kwargs)
- 2433 def __inner(self, *args, **kwargs):
- 2434 if kwargs.pop('clear_cache', True):
- -> 2435 result = f(self, *args, **kwargs)
- 2436 self.__cache.clear()
- 2437 return result
- /home/moguimar/.ve/oslo.config/lib/python2.7/site-packages/oslo_config/cfg.pyc in register_opt(self, opt, group, cli)
- 2607 self._add_cli_opt(opt, group)
- 2608 self._track_deprecated_opts(opt, group=group)
- -> 2609 return group._register_opt(opt, cli)
- 2610
- 2611 # NOTE(gcb) We can't use some names which are same with attributes of
- /home/moguimar/.ve/oslo.config/lib/python2.7/site-packages/oslo_config/cfg.pyc in _register_opt(self, opt, cli)
- 1903 :raises: DuplicateOptError if a naming conflict is detected
- 1904 """
- -> 1905 if _is_opt_registered(self._opts, opt):
- 1906 return False
- 1907
- /home/moguimar/.ve/oslo.config/lib/python2.7/site-packages/oslo_config/cfg.pyc in _is_opt_registered(opts, opt)
- 798 """
- 799 if opt.dest in opts:
- --> 800 if opts[opt.dest]['opt'] != opt:
- 801 raise DuplicateOptError(opt.name)
- 802 return True
- /home/moguimar/.ve/oslo.config/lib/python2.7/site-packages/oslo_config/cfg.pyc in __ne__(self, another)
- 1049
- 1050 def __ne__(self, another):
- -> 1051 return self._vars_for_cmp() != another._vars_for_cmp()
- 1052
- 1053 def __eq__(self, another):
- /home/moguimar/.ve/oslo.config/lib/python2.7/site-packages/oslo_config/types.pyc in __eq__(self, other)
- 900 return (
- 901 (self.__class__ == other.__class__) and
- --> 902 (self.value == other.value)
- 903 )
- 904
- AttributeError: 'URI' object has no attribute 'value'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement