Author: gilbert-guest Date: 2011-05-30 05:31:14 +0000 (Mon, 30 May 2011) New Revision: 16733 Modified: lib/python/debian_support.py Log: correct unhandled python-apt api change Modified: lib/python/debian_support.py ==================================================================--- lib/python/debian_support.py 2011-05-30 05:20:56 UTC (rev 16732) +++ lib/python/debian_support.py 2011-05-30 05:31:14 UTC (rev 16733) @@ -92,12 +92,16 @@ def __cmp__(self, other): return apt_pkg.VersionCompare(self.__forCompare, other.__forCompare) -def version_compare(a, b, vc = apt_pkg.VersionCompare): +def version_compare(a, b): """Compares two versions according to the Debian algorithm. ~bpo and ~volatile suffixes are ignored.""" a = _version_normalize_regexp.sub("", a) b = _version_normalize_regexp.sub("", b) + try: + vc = apt_pkg.version_compare + except AttributeError: + vc = apt_pkg.VersionCompare return vc(a, b) class PackageFile: