Create a DateTime object from the timestamp

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
Zack Cerza 2013-12-09 16:57:11 -06:00
parent 5ea5018dbe
commit 48b8ba4ad2

View 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