diff options
author | Soren Hansen <soren@linux2go.dk> | 2011-02-16 19:09:40 +0100 |
---|---|---|
committer | Soren Hansen <soren@linux2go.dk> | 2011-02-16 19:09:40 +0100 |
commit | 775fc13f8ea85bb74f8f55dedc02f44cb5aac2b9 (patch) | |
tree | 66b6289cb1e5a418384b7ed1d973cf6c5a4f984f /nova/context.py | |
parent | ef7e1003a2f7f0743808236e7e10d2a2b4369de6 (diff) | |
parent | 17abf5c23f90f15b557131f71657e70e7b5cdef8 (diff) | |
download | nova-775fc13f8ea85bb74f8f55dedc02f44cb5aac2b9.tar.gz nova-775fc13f8ea85bb74f8f55dedc02f44cb5aac2b9.tar.xz nova-775fc13f8ea85bb74f8f55dedc02f44cb5aac2b9.zip |
Merge 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, |