mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Catch OSError exception for subprocess calls.
This commit is contained in:
1 parent
acb5103119
commit
7f37f649da
6 files changed
+13
-13
No files matched your search
@@ -509,7 +509,7 @@ class IOUDevice(object):
|
||||
cwd=self._working_dir)
|
||||
|
||||
log.info("iouyap started PID={}".format(self._iouyap_process.pid))
|
||||
except subprocess.SubprocessError as e:
|
||||
except (OSError, subprocess.SubprocessError) as e:
|
||||
iouyap_stdout = self.read_iouyap_stdout()
|
||||
log.error("could not start iouyap: {}\n{}".format(e, iouyap_stdout))
|
||||
raise IOUError("Could not start iouyap: {}\n{}".format(e, iouyap_stdout))
|
||||
@@ -583,7 +583,7 @@ class IOUDevice(object):
|
||||
self._started = True
|
||||
except FileNotFoundError as e:
|
||||
raise IOUError("could not start IOU: {}: 32-bit binary support is probably not installed".format(e))
|
||||
except subprocess.SubprocessError as e:
|
||||
except (OSError, subprocess.SubprocessError) as e:
|
||||
iou_stdout = self.read_iou_stdout()
|
||||
log.error("could not start IOU {}: {}\n{}".format(self._path, e, iou_stdout))
|
||||
raise IOUError("could not start IOU {}: {}\n{}".format(self._path, e, iou_stdout))
|
||||
@@ -761,7 +761,7 @@ class IOUDevice(object):
|
||||
command.extend(["-l"])
|
||||
else:
|
||||
raise IOUError("layer 1 keepalive messages are not supported by {}".format(os.path.basename(self._path)))
|
||||
except subprocess.SubprocessError as e:
|
||||
except (OSError, subprocess.SubprocessError) as e:
|
||||
log.warn("could not determine if layer 1 keepalive messages are supported by {}: {}".format(os.path.basename(self._path), e))
|
||||
|
||||
def _build_command(self):
|
||||
|
||||
Reference in new issue
Block a user