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 <[email protected]>
Rackspace
_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev