[node-patches] Change in ovirt-node[master]: system: Use File() for CPE

fabiand at redhat.com fabiand at redhat.com
Tue Aug 12 13:15:37 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: system: Use File() for CPE
......................................................................

system: Use File() for CPE

This will allow us to use it during unit testing.

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/03/31403/1

diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 0853d44..76b2153 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -416,8 +416,7 @@
     def cpe(self):
         """Return the CPE URI
         """
-        with open(self.CPE_FILE, "r") as f:
-            return f.read().strip()
+        return File(self.CPE_FILE).read().strip()
 
     def is_fedora(self):
         """Determin if this system is a fedora system


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b6b28e0026ae9ae8804af906f2d0ad77bb9cac0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list