Comment 1 for bug 999307

Revision history for this message
Mark McLoughlin (markmc) wrote :

This was intentional to avoid registering different option schemas under the same name

Use cases are:

  opt = StrOpt('foo')

  def do_something():
      CONF.register_opt(opt)
      print CONF.foo

or

  class Bar:

      opt = StrOpt('foo')

      def __init__(self):
          CONF.register_opt(opt)

      def do_something(self):
          print CONF.foo

However, I'd take a patch to add an equality check, but all fields need to be checked, not just the name