summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorJosh Kearney <josh@jk0.org>2011-03-24 21:29:32 +0000
committerTarmac <>2011-03-24 21:29:32 +0000
commitf8d1d6da8daac5169948d504560ee8c1b4c0df3c (patch)
tree66b2a7197ed18793b1c6e4164e8232b43b97a708 /nova/utils.py
parentaeb0f59b71ad6f3a8eb5d649e23a22838937242f (diff)
parent3426a9296c6f7d249a9c57ba9e614045ffe2f3c7 (diff)
downloadnova-f8d1d6da8daac5169948d504560ee8c1b4c0df3c.tar.gz
nova-f8d1d6da8daac5169948d504560ee8c1b4c0df3c.tar.xz
nova-f8d1d6da8daac5169948d504560ee8c1b4c0df3c.zip
Adds unit test coverage for XenAPI Rescue & Unrescue.
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 465f81250..fa01f2c94 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -341,11 +341,8 @@ utcnow.override_time = None
def is_older_than(before, seconds):
- """Return True if before is older than 'seconds'"""
- if utcnow() - before > datetime.timedelta(seconds=seconds):
- return True
- else:
- return False
+ """Return True if before is older than seconds"""
+ return utcnow() - before > datetime.timedelta(seconds=seconds)
def utcnow_ts():