Skip to content

Commit

Permalink
Make sure AYON folder exists when getting site id (#75)
Browse files Browse the repository at this point in the history
* make sure ayon folder exists

* use 'os.path.exists'
  • Loading branch information
iLLiCiTiT authored Dec 6, 2023
1 parent 89ffa2e commit 7e1ad30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/ayon_common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7e1ad30

Please sign in to comment.