diff options
| author | termie <github@anarkystic.com> | 2011-02-15 17:23:54 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-02-15 17:23:54 +0000 |
| commit | a9705d95bace415df7796f9ef9562b118d4d1f68 (patch) | |
| tree | b1e453b68972ce2c9f917b6a970b20f4dd83c54f /nova | |
| parent | 18387e4ff3df86a2024be185a92b428141c23871 (diff) | |
| parent | 701c71999a135996575dd76a7171eb707b4d74ef (diff) | |
| download | nova-a9705d95bace415df7796f9ef9562b118d4d1f68.tar.gz nova-a9705d95bace415df7796f9ef9562b118d4d1f68.tar.xz nova-a9705d95bace415df7796f9ef9562b118d4d1f68.zip | |
Some trivial cleanups in context.py, mostly just a test of using the updated git-bzr-ng
Diffstat (limited to 'nova')
| -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, |
