Checks for broken symbolic links.

This commit is contained in:
Jeremy committed 2014-12-24 17:19:42 -07:00
1 parent 2de1a97076
commit 1f615430ae
3 files changed
+29 -3

No files matched your search

+4 -1
View File
@@ -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: