diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-11-22 18:36:46 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-11-22 18:36:46 +0100 |
| commit | fb4ef05de0a64f75f2896d9e74c88a3bb3db00c7 (patch) | |
| tree | be06aceff723613c6b726799c09a0951ee1a009d | |
| parent | ff886d6a8c468a31433013250aed337dfe0770cc (diff) | |
| download | python-apt-fb4ef05de0a64f75f2896d9e74c88a3bb3db00c7.tar.gz | |
apt/package.py: use lt() instead of cmp()
| -rw-r--r-- | apt/package.py | 4 | ||||
| -rw-r--r-- | debian/changelog | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apt/package.py b/apt/package.py index cb373c2e..45d6044b 100644 --- a/apt/package.py +++ b/apt/package.py @@ -707,8 +707,8 @@ class Package(object): return '<Package: name:%r architecture=%r id:%r>' % (self._pkg.name, self._pkg.architecture, self._pkg.id) - def __cmp__(self, other): - return cmp(self.name, other.name) + def __lt__(self, other): + return self.name < other.name def candidate(self): """Return the candidate version of the package. diff --git a/debian/changelog b/debian/changelog index cc922735..fece12fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,7 +18,7 @@ python-apt (0.8.2) UNRELEASED; urgency=low * apt/cache.py: - remove "print" when creating dirs in apt.Cache(rootdir=dir), thanks to Martin Pitt - - add __cmp__ to apt.Package so that sort() sorts by name + - add __lt__ to apt.Package so that sort() sorts by name on list of package objects * debian/control: - add recommends to xz-lzma to ensure we have the unlzma command |
