mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 16:58:28 +00:00
Catch FileNotFoundError exception in os.getcwd()
This commit is contained in:
parent
683a512917
commit
da2b895c99
@ -47,7 +47,11 @@ class Qemu(BaseManager):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
qemus = []
|
qemus = []
|
||||||
paths = [os.getcwd()]
|
paths = []
|
||||||
|
try:
|
||||||
|
paths.append(os.getcwd())
|
||||||
|
except FileNotFoundError:
|
||||||
|
log.warning("The current working directory doesn't exist")
|
||||||
if "PATH" in os.environ:
|
if "PATH" in os.environ:
|
||||||
paths.extend(os.environ["PATH"].split(os.pathsep))
|
paths.extend(os.environ["PATH"].split(os.pathsep))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user