]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Create a DateTime object from the timestamp
authorZack Cerza <zack@cerza.org>
Mon, 9 Dec 2013 22:57:11 +0000 (16:57 -0600)
committerZack Cerza <zack@cerza.org>
Mon, 9 Dec 2013 22:57:11 +0000 (16:57 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/queue.py

index c913aca517dc4aaa32b6079b32ca689b4e1f02dc..287a6798b29160ce9846868bd32143da89089734 100644 (file)
@@ -24,7 +24,8 @@ restart_file_path = '/tmp/teuthology-restart-workers'
 def need_restart():
     if not os.path.exists(restart_file_path):
         return False
-    if os.path.getmtime(restart_file_path) > start_time:
+    file_mtime = datetime.utcfromtimestamp(os.path.getmtime(restart_file_path))
+    if file_mtime > start_time:
         return True
     else:
         return False