diff options
author | brian-lamar <brian.lamar@gmail.com> | 2011-02-15 13:35:41 -0500 |
---|---|---|
committer | brian-lamar <brian.lamar@gmail.com> | 2011-02-15 13:35:41 -0500 |
commit | 6da631dd3a7bc9b105a6b1fea8841887fd5dd33d (patch) | |
tree | 7bced7172bab1ccfc66e97004a7fc1093c7feb31 /nova/context.py | |
parent | 24ad2cc21abbab494a3be18a7f09a6c1d9210804 (diff) | |
parent | 273e6703a9e4f7e3b7810f204ffb6bb0f86602bd (diff) | |
download | nova-6da631dd3a7bc9b105a6b1fea8841887fd5dd33d.tar.gz nova-6da631dd3a7bc9b105a6b1fea8841887fd5dd33d.tar.xz nova-6da631dd3a7bc9b105a6b1fea8841887fd5dd33d.zip |
Merged lp:nova
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/context.py b/nova/context.py index f2669c9f1..0256bf448 100644 --- a/nova/context.py +++ b/nova/context.py @@ -28,7 +28,6 @@ from nova import utils class RequestContext(object): - def __init__(self, user, project, is_admin=None, read_deleted=False, remote_address=None, timestamp=None, request_id=None): if hasattr(user, 'id'): @@ -53,7 +52,7 @@ class RequestContext(object): self.read_deleted = read_deleted self.remote_address = remote_address if not timestamp: - timestamp = datetime.datetime.utcnow() + timestamp = utils.utcnow() if isinstance(timestamp, str) or isinstance(timestamp, unicode): timestamp = utils.parse_isotime(timestamp) self.timestamp = timestamp @@ -101,7 +100,7 @@ class RequestContext(object): return cls(**values) def elevated(self, read_deleted=False): - """Return a version of this context with admin flag set""" + """Return a version of this context with admin flag set.""" return RequestContext(self.user_id, self.project_id, True, |