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

parse hms too, refs #21504

parent 044077bf
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ def test_last_backup_is_recent(server): ...@@ -37,7 +37,7 @@ def test_last_backup_is_recent(server):
status, out = subprocess.getstatusoutput(cmd) status, out = subprocess.getstatusoutput(cmd)
if status == 0: if status == 0:
date = out.strip().split(' ')[-2] date = out.strip().split(' ')[-2]
pdate = datetime.strptime(date, '%Y-%m-%d') pdate = datetime.strptime(date, '%Y-%m-%d-%HMS')
if (datetime.now() - pdate).days > 2: if (datetime.now() - pdate).days > 2:
print('Backup is older than 2 days') print('Backup is older than 2 days')
return False return False
......
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