From f6cd0f7f6dbde8e054ed379fb20129fd6b3e8188 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:23:36 +0200 Subject: [PATCH] use absolute paths, refs #21677 --- tests/test_backup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_backup.py b/tests/test_backup.py index cbd68fdf..7497a8cb 100755 --- a/tests/test_backup.py +++ b/tests/test_backup.py @@ -70,8 +70,8 @@ def test_backup_space(server): def check_local_backup(path): all_ok = True for d in os.listdir(path): - if os.path.isdir(d): - subd = os.path.join(path, d) + subd = os.path.join(path, d) + if os.path.isdir(subd): latest = os.path.join(subd, 'latest') print('Checking %s' % latest) if os.path.exists(latest): @@ -86,8 +86,8 @@ def check_local_backup(path): print('Backup %s is fine' % subd) else: for dd in os.listdir(subd): - if os.path.isdir(dd): - subsubd = os.path.join(subd, dd) + subsubd = os.path.join(subd, dd) + if os.path.isdir(subsubd): all_ok = min(all_ok, check_local_backup(subsubd)) return all_ok @@ -98,7 +98,7 @@ def check_local_backups(paths): folders = paths.split(',') for f in folders: if f not in blacklist: - print('Checking folder %s' % f) + print('Checking top folder %s' % f) all_ok = min(check_local_backup(f), all_ok) return all_ok -- GitLab