diff options
author | Paul Wise <pabs@debian.org> | 2012-02-17 01:30:57 +0000 |
---|---|---|
committer | Paul Wise <pabs@debian.org> | 2012-02-17 01:30:57 +0000 |
commit | 5d1f5d6b864629cb51e812a0de65c10d7a36aa5c (patch) | |
tree | cd0bf379f2db876dbd1a9bbbdee9272db479f8af /lib/python/debian_support.py | |
parent | 4cf72b352d38e33080d86e79377178d54028f4a3 (diff) |
Fix a crash when running the update script with a newer apt_pkg
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@18465 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/debian_support.py')
-rw-r--r-- | lib/python/debian_support.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/python/debian_support.py b/lib/python/debian_support.py index 258ec47ffe..41dcb4f397 100644 --- a/lib/python/debian_support.py +++ b/lib/python/debian_support.py @@ -90,7 +90,10 @@ class Version: return 'Version(%s)' % `self.__asString` def __cmp__(self, other): - return apt_pkg.VersionCompare(self.__forCompare, other.__forCompare) + try: + return apt_pkg.version_compare(self.__forCompare, other.__forCompare) + except AttributeError: + return apt_pkg.VersionCompare(self.__forCompare, other.__forCompare) def version_compare(a, b): """Compares two versions according to the Debian algorithm. |