diff options
author | Josh Kearney <josh@jk0.org> | 2011-03-24 10:30:09 -0500 |
---|---|---|
committer | Josh Kearney <josh@jk0.org> | 2011-03-24 10:30:09 -0500 |
commit | cf70a1a76dfa0456ea6230eaa014fa98e7ddd464 (patch) | |
tree | 74cd73f91f7a227855a53b32272b87e769c0a2e8 /nova/utils.py | |
parent | 97ac70c45b78dcffeeb53f7408c42e3e240ca6d7 (diff) | |
download | nova-cf70a1a76dfa0456ea6230eaa014fa98e7ddd464.tar.gz nova-cf70a1a76dfa0456ea6230eaa014fa98e7ddd464.tar.xz nova-cf70a1a76dfa0456ea6230eaa014fa98e7ddd464.zip |
Small refactor
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nova/utils.py b/nova/utils.py index 03a6e8095..6042a5332 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -336,11 +336,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(): |