diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-07-14 15:31:04 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-07-14 15:31:04 +0000 |
commit | 92605ca65fc46010f22d4903c9956ba97a3071b6 (patch) | |
tree | 4b3ec6d2e60c99da0cdc64df78eb5d84dfaa7d88 | |
parent | a34cdc40842a0c6613af5633227e8e8166d03367 (diff) | |
download | bcfg2-92605ca65fc46010f22d4903c9956ba97a3071b6.tar.gz bcfg2-92605ca65fc46010f22d4903c9956ba97a3071b6.tar.bz2 bcfg2-92605ca65fc46010f22d4903c9956ba97a3071b6.zip |
Another minor patch from Jason
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1938 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | tools/rpmlisting.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/rpmlisting.py b/tools/rpmlisting.py index 0bbfd1d14..b1e0bec61 100644 --- a/tools/rpmlisting.py +++ b/tools/rpmlisting.py @@ -47,18 +47,18 @@ def verstr_cmp(a, b): subindex = subindex + 1 if len(a_subparts) != len(b_subparts): # handle prerelease special case at subpart level (ie, '4.0.2rc5'). - if len(a_subparts) > len(b_subparts) and prerelease_pattern.match(a_subparts[subindex]): + if len(a_subparts) > len(b_subparts) and prerelease_pattern.match(str(a_subparts[subindex])): return -1 - elif len(a_subparts) < len(b_subparts) and prerelease_pattern.match(b_subparts[subindex]): + elif len(a_subparts) < len(b_subparts) and prerelease_pattern.match(str(b_subparts[subindex])): return 1 else: return len(a_subparts) - len(b_subparts) index = index + 1 if len(a_parts) != len(b_parts): # handle prerelease special case at part level (ie, '4.0.2.rc5). - if len(a_parts) > len(b_parts) and prerelease_pattern.match(a_parts[index][0]): + if len(a_parts) > len(b_parts) and prerelease_pattern.match(str(a_parts[index][0])): return -1 - elif len(a_parts) < len(b_parts) and prerelease_pattern.match(b_parts[index][0]): + elif len(a_parts) < len(b_parts) and prerelease_pattern.match(str(b_parts[index][0])): return 1 else: return len(a_parts) - len(b_parts) |