From b215f7651d9e69c6e433206ef13d494b50f4bbdd Mon Sep 17 00:00:00 2001 From: Elisa-Visentin <121040436+Elisa-Visentin@users.noreply.github.com> Date: Thu, 6 Jul 2023 14:24:17 +0200 Subject: [PATCH] Update conftest.py directories creation (downloads) --- magicctapipe/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/magicctapipe/conftest.py b/magicctapipe/conftest.py index 1deec4992..be425c356 100644 --- a/magicctapipe/conftest.py +++ b/magicctapipe/conftest.py @@ -276,6 +276,8 @@ def scp_file(path, url, env_prefix): Download of test files through rsync """ pwd = os.environ[env_prefix + "PASSWORD"] + if not path.exists(): + subprocess.run(["mkdir", "-p", str(path)]) if not (path / url.name).exists(): print("DOWNLOADING...") cmd = f'''/bin/bash -c "rsync {str(url)} {str(path)}"'''