[node-patches] Change in ovirt-node[master]: system: Fix major upgrade detection

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Jun 26 14:01:09 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: system: Fix major upgrade detection
......................................................................

system: Fix major upgrade detection

Change-Id: I2acc242c2e1633f069837b8b18b2d0615b0260a3
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/installer/core/welcome_page.py
M src/ovirt/node/utils/system.py
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/88/29288/1

diff --git a/src/ovirt/node/installer/core/welcome_page.py b/src/ovirt/node/installer/core/welcome_page.py
index 2e63ddf..f19d13b 100644
--- a/src/ovirt/node/installer/core/welcome_page.py
+++ b/src/ovirt/node/installer/core/welcome_page.py
@@ -91,7 +91,8 @@
 
         media = utils.system.InstallationMedia()
         installed = utils.system.InstalledMedia()
-        if media.version_major != installed.version_major:
+        if (installed.available()
+            and (media.version_major != installed.version_major)):
             block_upgrade = True
         elif utils.system.has_hostvg():
             has_hostvg = True
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 705dd56..7b771fc 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -469,6 +469,10 @@
         if data:
             self.version, self.release = data
 
+    def available(self):
+        """Determin if there is an installed media
+        """
+        return int(self.version_major) > 0
 
 class Keyboard(base.Base):
     """Configure the system wide keyboard layout


-- 
To view, visit http://gerrit.ovirt.org/29288
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2acc242c2e1633f069837b8b18b2d0615b0260a3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list