mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Checks for broken symbolic links.
This commit is contained in:
1 parent
2de1a97076
commit
1f615430ae
3 files changed
+29
-3
No files matched your search
@@ -539,7 +539,10 @@ class IOUDevice(object):
|
||||
if not self.is_running():
|
||||
|
||||
if not os.path.isfile(self._path) or not os.path.exists(self._path):
|
||||
raise IOUError("IOU image '{}' is not accessible".format(self._path))
|
||||
if os.path.islink(self._path):
|
||||
raise IOUError("IOU image '{}' linked to '{}' is not accessible".format(self._path, os.path.realpath(self._path)))
|
||||
else:
|
||||
raise IOUError("IOU image '{}' is not accessible".format(self._path))
|
||||
|
||||
try:
|
||||
with open(self._path, "rb") as f:
|
||||
|
||||
Reference in new issue
Block a user