diff options
author | Chris Lumens <clumens@redhat.com> | 2005-05-11 19:13:47 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-05-11 19:13:47 +0000 |
commit | 8b54ac76392689e5c8d5668e26ee8259f05bc52a (patch) | |
tree | 7700d1336583dae51a9e87b7f9a18ac79de2b7c2 /isys/isys.py | |
parent | 7fa91cc6f7c0be9a8c1a7efda056270d981a49fc (diff) | |
download | anaconda-8b54ac76392689e5c8d5668e26ee8259f05bc52a.tar.gz anaconda-8b54ac76392689e5c8d5668e26ee8259f05bc52a.tar.xz anaconda-8b54ac76392689e5c8d5668e26ee8259f05bc52a.zip |
Make drive sorting smarter.
Diffstat (limited to 'isys/isys.py')
-rw-r--r-- | isys/isys.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/isys/isys.py b/isys/isys.py index 030da6fa5..6db63e9ba 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -542,10 +542,19 @@ def compareDrives(first, second): return -1 elif (type1 > type2): return 1 - elif first < second: - return -1 - elif first > second: - return 1 + else: + len1 = len(first) + len2 = len(second) + + if (len1 < len2): + return -1 + elif (len1 > len2): + return 1 + else: + if (first < second): + return -1 + elif (first > second): + return 1 return 0 |