[node-patches] Change in ovirt-node[master]: Fix convert_to_biosdevname raises exception issue

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Feb 19 14:14:03 UTC 2014


Hello hadong,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/24754

to review the following change.

Change subject: Fix convert_to_biosdevname raises exception issue
......................................................................

Fix convert_to_biosdevname raises exception issue

Change-Id: I0e26f4ff33c8dcf05f6f9fd672ea288668397299
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1047489
Signed-off-by: hadong <hadong at redhat.com>
---
M src/ovirtnode/network.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/54/24754/1

diff --git a/src/ovirtnode/network.py b/src/ovirtnode/network.py
index 53b3b73..1dc3ed6 100644
--- a/src/ovirtnode/network.py
+++ b/src/ovirtnode/network.py
@@ -57,7 +57,7 @@
     except:
         pass
 
-        OVIRT_VARS = _functions.parse_defaults()
+    OVIRT_VARS = _functions.parse_defaults()
     if not "BIOSDEVNAMES_CONVERSION" in OVIRT_VARS:
         # check for appropriate bios version
         cmd="dmidecode|grep SMBIOS|awk {'print $2'}"
@@ -87,6 +87,8 @@
             logger.debug("Processing %s" % file)
             # get mac for matching
             existing_mac = _functions.augtool_get("/files/" + file + "/HWADDR")
+            if not existing_mac is None:
+                existing_mac = existing_mac.strip('\"')
             # check dictionary for mac
             if not existing_mac is None and existing_mac.upper() in nics:
                 old_nic_script = os.path.basename(file)


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

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



More information about the node-patches mailing list