From 3a70e20e97d8468f213d7d8ab529e1000c42d326 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu>
Date: Thu, 1 Jun 2017 11:25:58 +0200
Subject: [PATCH] do not descend if latest was found refs #21677

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

diff --git a/tests/test_backup.py b/tests/test_backup.py
index e2b5de49..cf95f6d3 100755
--- a/tests/test_backup.py
+++ b/tests/test_backup.py
@@ -84,12 +84,12 @@ def check_local_backup(path, descend=True):
                     all_ok = False 
                 else:
                     print('Backup %s is fine' % subd)
-            else:
-                if descend:
-                    for dd in os.listdir(subd):
-                        subsubd = os.path.join(subd, dd)
-                        if os.path.isdir(subsubd):
-                            all_ok = min(all_ok, check_local_backup(subsubd, descend=False))
+        else:
+            if descend:
+                for dd in os.listdir(subd):
+                    subsubd = os.path.join(subd, dd)
+                    if os.path.isdir(subsubd):
+                        all_ok = min(all_ok, check_local_backup(subsubd, descend=False))
     return all_ok
 
 
-- 
GitLab