On Thu, 2014-08-07 at 17:44 +0100, Matthew Booth wrote:
> These are tricky, case-by-case workarounds to a general problem which
> can be solved by simply calling register_opts() in a place where it's
> guaranteed to be safe. 

No, THE CODE IS WRONG.  It is evaluating a configuration value at
_module load time_ rather than at run time.  It is wrong for the same
reason that "def foo(arg={})" is wrong.  If you fix the time at which
evaluation occurs, importing is no longer a problem.

> Is there any reason not to call register_opts()
> before importing other modules?

-- 
Kevin L. Mitchell <kevin.mitch...@rackspace.com>
Rackspace


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to