1
0
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:
grossmj 2015-04-26 12:49:29 -06:00
parent 683a512917
commit da2b895c99

View File

@ -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: