diff options
| author | Naveed Massjouni <naveedm9@gmail.com> | 2011-02-18 13:27:30 -0500 |
|---|---|---|
| committer | Naveed Massjouni <naveedm9@gmail.com> | 2011-02-18 13:27:30 -0500 |
| commit | a55fefdd78ac984b366c8e1701cbbd8f5ad18e97 (patch) | |
| tree | 528927e45c4ff8d4bbc0b3850da10454f12baeb3 /nova/context.py | |
| parent | 4673afddcb5a1069f75fb3493e43498ed1de11f9 (diff) | |
| parent | 5dfa5ce7d1374509fea51f8d0b132ea865f34dc6 (diff) | |
| download | nova-a55fefdd78ac984b366c8e1701cbbd8f5ad18e97.tar.gz nova-a55fefdd78ac984b366c8e1701cbbd8f5ad18e97.tar.xz nova-a55fefdd78ac984b366c8e1701cbbd8f5ad18e97.zip | |
Merging trunk to my branch. Fixed conflicts in Authors file and .mailmap.
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, |
