From 77d1d876f0c8342674ca62c59e847774bf423a8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu>
Date: Thu, 2 Mar 2017 15:51:44 +0100
Subject: [PATCH] fix output parser

---
 tests/test_backup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_backup.py b/tests/test_backup.py
index 383148f6..e9f7cee5 100755
--- a/tests/test_backup.py
+++ b/tests/test_backup.py
@@ -19,9 +19,9 @@ def test_ssh(server):
 def test_last_backup_is_recent(server, client):
     path = '/backup/%s/current' % client
     cmd = 'ssh %s ls -l %s | grep current' % (server, path)
-    status, out = subprocess.getstatusoutput(cmd).strip()
+    status, out = subprocess.getstatusoutput(cmd)
     if status == 0:
-        date = out.split(' ')[-1]
+        date = out.strip().split(' ')[-1]
         print(date)
     else:
         return False
-- 
GitLab