From f76a0a9d4d8aa3d8cc2669da1a8eea7d610a8616 Mon Sep 17 00:00:00 2001 From: termie Date: Sun, 30 Jan 2011 15:55:48 -0800 Subject: trivial cleanup for context.py --- nova/context.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'nova/context.py') diff --git a/nova/context.py b/nova/context.py index f2669c9f1..76e46703a 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() + timestampe = 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, -- cgit From 701c71999a135996575dd76a7171eb707b4d74ef Mon Sep 17 00:00:00 2001 From: termie Date: Sun, 30 Jan 2011 16:04:52 -0800 Subject: woops --- nova/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/context.py') diff --git a/nova/context.py b/nova/context.py index 76e46703a..0256bf448 100644 --- a/nova/context.py +++ b/nova/context.py @@ -52,7 +52,7 @@ class RequestContext(object): self.read_deleted = read_deleted self.remote_address = remote_address if not timestamp: - timestampe = utils.utcnow() + timestamp = utils.utcnow() if isinstance(timestamp, str) or isinstance(timestamp, unicode): timestamp = utils.parse_isotime(timestamp) self.timestamp = timestamp -- cgit