From: David Shea <dshea(a)redhat.com>
There are some special cases of interface names where something follows
the VLAN ID, such as -fcoe. We can't interact with these via
NetworkManager so return nothing instead of raising a ValueError, which
will cause SettingsNotFound to be raised instead.
Resolves: rhbz#1274893
---
pyanaconda/nm.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index 745775a..abd3bd9 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -634,7 +634,16 @@ def _device_settings(name):
if not settings:
# connections generated by NM from iBFT
_parent, _sep, vlanid = name.partition(".")
- settings = _find_settings(int(vlanid), 'vlan', 'id')
+
+ # If we are not able to convert the VLAN id to an int this
+ # is probably a FCoE interface and we're not going to be able
+ # to do much with it.
+ try:
+ vlanid = int(vlanid)
+ except ValueError:
+ return []
+
+ settings = _find_settings(vlanid, 'vlan', 'id')
else:
settings = _find_settings(name, 'connection', 'interface-name')
if not settings:
--
To view this commit on github, visit
https://github.com/rhinstaller/anaconda/commit/74b18217f5d8c1031953791822...