Catch FileNotFoundError exception in os.getcwd()

This commit is contained in:
grossmj committed 2015-04-26 12:49:29 -06:00
1 parent 683a512917
commit da2b895c99
1 file changed
+5 -1
+5 -1
View File
@@ -47,7 +47,11 @@ class Qemu(BaseManager):
"""
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:
paths.extend(os.environ["PATH"].split(os.pathsep))
else: