[master 1/1] Hotfix for missing storage in payload class (#1271657)
by dashea
From: Jiri Konecny <jkonecny(a)redhat.com>
The problem here is that payload is setting up storage when
PayloadManager run a thread but the user could do steps which
will call the spaceRequired() method sooner.
Now the behavior is the same as it was with the old spaceRequired
method for the variant when storage is not set.
Resolves: rhbz#1271657
---
pyanaconda/packaging/dnfpayload.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index 211271e..40778c6 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -585,6 +585,10 @@ def repos(self):
@property
def spaceRequired(self):
size = self._spaceRequired()
+ if not self.storage:
+ log.warning("Payload doesn't have storage")
+ return size
+
download_size = self._download_space
valid_points = _df_map()
root_mpoint = pyanaconda.iutil.getSysroot()
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/5e3137bdd8463a13b7ecc210ab...
8 years, 2 months