[node-patches] Change in ovirt-node[master]: Fix: Use correct number of CPE fields

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Apr 24 14:41:32 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: Fix: Use correct number of CPE fields
......................................................................

Fix: Use correct number of CPE fields

Change-Id: I73752232536371ab0012a00c82f9d0f935eb8c2b
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/utils/system.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/10/14210/1

diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 79ffe9b..c5b9ca6 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -83,14 +83,14 @@
         """Parse the CPE FILE
         """
         with open(self.CPE_FILE, "r") as f:
-            cpe_uri = f.read()
+            cpe_uri = f.read().strip()
             self.logger.debug("Read CPE URI: %s" % cpe_uri)
             cpe_parts = cpe_uri.split(":")
             self.logger.debug("Parsed CPE parts: %s" % cpe_parts)
             if cpe_parts[0] != "cpe":
                 raise RuntimeError("Can not parse CPE string in %s" %
                                    self.CPE_FILE)
-            self.VENDOR, self.PRODUCT, self.VERSION = cpe_parts[2:4]
+            self.VENDOR, self.PRODUCT, self.VERSION = cpe_parts[2:5]
 
 
 class ProductInformation(base.Base):


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

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



More information about the node-patches mailing list