[blivet:master 14/14] Rearrange _startEdd to be a little more obvious.
mulhern
amulhern at redhat.com
Fri Mar 28 22:50:39 UTC 2014
This change was prompted by an unused variable warning.
The method should behave identically, except for the unlikely
scenario where rc is "NIC=", in which case the previous version
would raise a ValueError, and the new version logs an error.
---
blivet/fcoe.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/blivet/fcoe.py b/blivet/fcoe.py
index 62b047a..d4cad3b 100644
--- a/blivet/fcoe.py
+++ b/blivet/fcoe.py
@@ -73,15 +73,11 @@ class fcoe(object):
except OSError as e:
rc = e.strerror
- if not rc.startswith("NIC="):
+ (key, _equals, val) = rc.strip().partition("=")
+ if not val or key != "NIC":
log.info("No FCoE EDD info found: %s", rc.rstrip())
return
- (key, val) = rc.strip().split("=", 1)
- #if val not in isys.getDeviceProperties():
- # log.error("Unknown FCoE NIC found in EDD: %s, ignoring", val)
- # return
-
log.info("FCoE NIC found in EDD: %s", val)
self.addSan(val, dcb=True, auto_vlan=True)
--
1.8.3.1
More information about the anaconda-patches
mailing list