Skip to content
Snippets Groups Projects
Commit e372f5da authored by Florent Thiery's avatar Florent Thiery
Browse files

fix time comparison, refs #20687

parent d336f606
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ def test_last_backup_is_recent(server, client):
if status == 0:
date = out.strip().split(' ')[-2]
pdate = datetime.strptime(date, '%Y-%m-%d')
if datetime.now() - pdate > 2:
if (datetime.now() - pdate).days > 2:
print('Backup is older than 2 days')
return False
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment