diff options
author | Ryan Lane <rlane@wikimedia.org> | 2011-03-03 23:04:11 +0000 |
---|---|---|
committer | Ryan Lane <rlane@wikimedia.org> | 2011-03-03 23:04:11 +0000 |
commit | df3a65793ec7bb9d85d2a3da47fbbfb9e97d03d4 (patch) | |
tree | aab853348a2df9f5cdb26a77dd836d4f2083f119 /nova/context.py | |
parent | 4c50ddee48971c76f0f6252295747b89de5d3697 (diff) | |
parent | 7ca1669603132e3afd14606dda3f95ccbce08a41 (diff) | |
download | nova-df3a65793ec7bb9d85d2a3da47fbbfb9e97d03d4.tar.gz nova-df3a65793ec7bb9d85d2a3da47fbbfb9e97d03d4.tar.xz nova-df3a65793ec7bb9d85d2a3da47fbbfb9e97d03d4.zip |
Merge from trunk
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, |