]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Re-assign quantum.api module as last operation
authorSalvatore Orlando <salv.orlando@gmail.com>
Wed, 10 Jul 2013 16:11:01 +0000 (18:11 +0200)
committerSalvatore Orlando <salv.orlando@gmail.com>
Mon, 15 Jul 2013 20:51:28 +0000 (22:51 +0200)
Bug 1199443

This avoids reset of locals in quantum/api/__init__.py,
resulting in sys being None when assigning quantum.api.extensions
to neutron.api.extensions

Change-Id: I2da8b336679b643c92824399a05ca1b9980d1598

quantum/api/__init__.py

index e30a54c034e6a82dad084d62baec14761e2a3bef..4f87171a13622ddc9acb351ee238e4be893249d8 100644 (file)
@@ -29,6 +29,8 @@ warnings.warn(
     _('You are using old configuration values for the api-paste config. '
       'Please update for Neutron.')
 )
-sys.modules['quantum.api'] = api
 sys.modules['quantum.api.extensions'] = extensions
 sys.modules['quantum.api.v2'] = v2
+# The following assigment must be performed at the end of the module.
+# Otherwise local variables will be overwritten.
+sys.modules['quantum.api'] = api