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
@@ -354,8 +354,11 @@ class Router(object):
|
||||
self.resume()
|
||||
elif status == "inactive":
|
||||
|
||||
if not os.path.isfile(self._image):
|
||||
raise DynamipsError("IOS image '{}' is not accessible".format(self._image))
|
||||
if not os.path.isfile(self._image) or not os.path.exists(self._image):
|
||||
if os.path.islink(self._image):
|
||||
raise DynamipsError("IOS image '{}' linked to '{}' is not accessible".format(self._image, os.path.realpath(self._image)))
|
||||
else:
|
||||
raise DynamipsError("IOS image '{}' is not accessible".format(self._image))
|
||||
|
||||
try:
|
||||
with open(self._image, "rb") as f:
|
||||
|
||||
Reference in new issue
Block a user