From: "Brian C. Lane" <bcl(a)redhat.com>
The os.stat(osimg.path) has become a false positive catch point for
other failures. Raise an error on purpose if it cannot be set. The real
error should be in the logs someplace.
---
pyanaconda/packaging/livepayload.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index 5067f0d..ef07eb4 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -75,6 +75,9 @@ def setup(self, storage, instClass):
# Mount the live device and copy from it instead of the overlay at /
osimg = storage.devicetree.getDeviceByPath(self.data.method.partition)
+ if not osimg:
+ raise PayloadInstallError("Unable to find osimg for %s" %
self.data.method.partition)
+
if not stat.S_ISBLK(os.stat(osimg.path)[stat.ST_MODE]):
exn = PayloadSetupError("%s is not a valid block device" %
(self.data.method.partition,))
if errorHandler.cb(exn) == ERROR_RAISE:
--
To view this commit on github, visit
https://github.com/rhinstaller/anaconda/commit/cbf35420560a44a4c47ff672b5...