From 55b9a5307d705da91d3ef317639356c748853a7c Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Fri, 9 Dec 2022 14:17:49 +0000 Subject: Tests: fixed tests to run as privileged user. --- test/unit/utils.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/unit/utils.py') diff --git a/test/unit/utils.py b/test/unit/utils.py index 43aaa81b..f9e9d08a 100644 --- a/test/unit/utils.py +++ b/test/unit/utils.py @@ -12,9 +12,15 @@ def public_dir(path): for root, dirs, files in os.walk(path): for d in dirs: - os.chmod(os.path.join(root, d), 0o777) + try: + os.chmod(os.path.join(root, d), 0o777) + except FileNotFoundError: + pass for f in files: - os.chmod(os.path.join(root, f), 0o777) + try: + os.chmod(os.path.join(root, f), 0o777) + except FileNotFoundError: + pass def waitforfiles(*files, timeout=50): -- cgit