summaryrefslogtreecommitdiff
path: root/nova/context.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2012-03-15 13:02:07 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2012-03-15 13:34:19 -0700
commit4012a3f792ca5958616b31f7594f200d18665d71 (patch)
tree444722891796be2626c14e67fe65d119492ab991 /nova/context.py
parent97eb92880e0886a3f257f32a88ba9e55b8ec8a90 (diff)
downloadnova-4012a3f792ca5958616b31f7594f200d18665d71.tar.gz
Keep context for logging intact in greenthreads
* fixes bug 942918 Change-Id: Ia0fcf459c53b95a8675472adcfbba08014e34e5b
Diffstat (limited to 'nova/context.py')
-rw-r--r--nova/context.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/context.py b/nova/context.py
index c5c3162fb4..cab8b2d4b2 100644
--- a/nova/context.py
+++ b/nova/context.py
@@ -81,7 +81,10 @@ class RequestContext(object):
self.request_id = request_id
self.auth_token = auth_token
if overwrite or not hasattr(local.store, 'context'):
- local.store.context = self
+ self.update_store()
+
+ def update_store(self):
+ local.store.context = self
def to_dict(self):
return {'user_id': self.user_id,