From 7e1ad30e658f5790883fd377fcc127e6daa9cde8 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 6 Dec 2023 20:36:39 +0100 Subject: [PATCH] Make sure AYON folder exists when getting site id (#75) * make sure ayon folder exists * use 'os.path.exists' --- common/ayon_common/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/ayon_common/utils.py b/common/ayon_common/utils.py index 5cf3b2f2c..1bbed7942 100644 --- a/common/ayon_common/utils.py +++ b/common/ayon_common/utils.py @@ -95,6 +95,9 @@ def get_local_site_id(): site_id = stream.read() if not site_id: + folder_path = os.path.dirname(site_id_path) + if not os.path.exists(folder_path): + os.makedirs(folder_path) site_id = _create_local_site_id() with open(site_id_path, "w") as stream: stream.write(site_id)