diff options
author | lloyd <[email protected]> | 2010-06-22 18:54:00 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-22 18:54:00 +0000 |
commit | 6ce84feb335754f043a18adff28268ac02b955e0 (patch) | |
tree | 7979a1a15f3dce871bd8e69a4693eefd90c8da6c | |
parent | 183661b74f6c9465a0e88647c8027546b1d0b431 (diff) |
Coerce values to a list before trying to concatenate. This ensures the
same code works in Python 2 and Python 3. At this point the only
changes required to make configure.py run under Python 3.1 is changing
the exception catch syntax (from "catch Exception, e" to "catch
Exception as e"). Unfortunately Python 2.4 doesn't understand this new
syntax, though 2.6 does.
-rwxr-xr-x | configure.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.py b/configure.py index b0b5810a7..5d7601897 100755 --- a/configure.py +++ b/configure.py @@ -593,11 +593,12 @@ class ArchInfo(object): self.isa_extn.get('all', [])) """ - Return a list of all submodels for this arch + Return a list of all submodels for this arch, ordered longest + to shortest """ def all_submodels(self): - return sorted(zip(self.submodels, self.submodels) + - self.submodel_aliases.items(), + return sorted(list(zip(self.submodels, self.submodels)) + + list(self.submodel_aliases.items()), key = lambda k: len(k[0]), reverse = True) """ |