mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix - add exception handling
This commit is contained in:
parent
0a9d2cde7f
commit
3872b3909e
1 changed files with 10 additions and 3 deletions
13
start.py
13
start.py
|
|
@ -305,12 +305,19 @@ def run_disk_mapping_commands(mongo_url):
|
|||
args)
|
||||
|
||||
raise RuntimeError(exc_msg)
|
||||
except TypeError:
|
||||
_print("Error in mapping drive")
|
||||
except TypeError as exc:
|
||||
_print("Error {} in mapping drive {}, {}".format(str(exc),
|
||||
source,
|
||||
destination))
|
||||
raise
|
||||
else:
|
||||
_print("disk mapping {}->{}".format(source, destination))
|
||||
if not os.path.exists(destination):
|
||||
os.symlink(source, destination)
|
||||
try:
|
||||
os.symlink(source, destination)
|
||||
except OSError as exc:
|
||||
_print("Error {} in mapping drive {}, {}".format(
|
||||
str(exc), source, destination))
|
||||
else:
|
||||
_print("Destination {} already exists".format(destination))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue