diff options
author | Cerberus <matt.dietz@rackspace.com> | 2011-02-16 13:49:54 -0600 |
---|---|---|
committer | Cerberus <matt.dietz@rackspace.com> | 2011-02-16 13:49:54 -0600 |
commit | d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933 (patch) | |
tree | fd030094eb5a120c94a95befab07befc69dc6dbc /nova/context.py | |
parent | 879845496a50477ebc2709291c159ae1e8d5aa2a (diff) | |
parent | 61963f00ad70e73a06ffb35f3fd4b08696e39502 (diff) | |
download | nova-d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933.tar.gz nova-d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933.tar.xz nova-d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933.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, |