mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
update os.makedirs
This commit is contained in:
parent
edcaa8b62f
commit
ef785e75e3
1 changed files with 9 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
import os
|
||||
import errno
|
||||
import re
|
||||
import uuid
|
||||
import logging
|
||||
|
|
@ -786,7 +787,14 @@ def update_job_var_context():
|
|||
hou.hscript("set JOB=" + job_path)
|
||||
os.environ["JOB"] = job_path
|
||||
|
||||
os.makedirs(job_path, exist_ok=True)
|
||||
try:
|
||||
os.makedirs(job_path)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
print(
|
||||
" - Failed to create JOB dir. Maybe due to "
|
||||
"insufficient permissions."
|
||||
)
|
||||
|
||||
print(" - Context changed, update $JOB respectively to "
|
||||
+ job_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue