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

fix output parser

parent 50655059
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,9 @@ def test_ssh(server): ...@@ -19,9 +19,9 @@ def test_ssh(server):
def test_last_backup_is_recent(server, client): def test_last_backup_is_recent(server, client):
path = '/backup/%s/current' % client path = '/backup/%s/current' % client
cmd = 'ssh %s ls -l %s | grep current' % (server, path) cmd = 'ssh %s ls -l %s | grep current' % (server, path)
status, out = subprocess.getstatusoutput(cmd).strip() status, out = subprocess.getstatusoutput(cmd)
if status == 0: if status == 0:
date = out.split(' ')[-1] date = out.strip().split(' ')[-1]
print(date) print(date)
else: else:
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