summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-04-23 14:36:02 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-04-23 14:36:02 +0000
commitb52625141547473469e7c5e391670833f7ffa3f8 (patch)
tree467876d96c55edaf158b70e3381263cc3603dac3 /isys
parentbbc4273d668993dcace6d35245c556fba4e7e3ec (diff)
downloadanaconda-b52625141547473469e7c5e391670833f7ffa3f8.tar.gz
anaconda-b52625141547473469e7c5e391670833f7ffa3f8.tar.xz
anaconda-b52625141547473469e7c5e391670833f7ffa3f8.zip
* isys/isys.py (compareNetDevices): If either device lacks an int in
its name, return 0 (#237431).
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 10045655f..813de7976 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -528,8 +528,11 @@ def compareDrives(first, second):
return 0
def compareNetDevices(first, second):
- trimmed_first = int(first.lstrip(string.letters))
- trimmed_second = int(second.lstrip(string.letters))
+ try:
+ trimmed_first = int(first.lstrip(string.letters))
+ trimmed_second = int(second.lstrip(string.letters))
+ except:
+ return 0
if trimmed_first < trimmed_second:
return -1