From f17fc818cca41668bb6358e490ff3278e64fa493 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 5 Oct 2011 10:32:04 +0200 Subject: * tests/test_apt_cache.py: - add __cmp__ to apt.Package so that sort() sorts by name on list of package objects --- apt/package.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt') diff --git a/apt/package.py b/apt/package.py index 4104f93e..cb373c2e 100644 --- a/apt/package.py +++ b/apt/package.py @@ -707,6 +707,9 @@ class Package(object): return '' % (self._pkg.name, self._pkg.architecture, self._pkg.id) + def __cmp__(self, other): + return cmp(self.name, other.name) + def candidate(self): """Return the candidate version of the package. -- cgit v1.2.3 From 1948d5d03887eb81ea7797c0f23049ef6c3895ce Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 10 Nov 2011 10:05:55 +0100 Subject: * apt/cache.py: - remove "print" when creating dirs in apt.Cache(rootdir=dir), thanks to Martin Pitt --- apt/cache.py | 2 +- debian/changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'apt') diff --git a/apt/cache.py b/apt/cache.py index bab5c277..a4585277 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -111,7 +111,7 @@ class Cache(object): ] for d in dirs: if not os.path.exists(rootdir + d): - print "creating: ", rootdir + d + #print "creating: ", rootdir + d os.makedirs(rootdir + d) for f in files: if not os.path.exists(rootdir + f): diff --git a/debian/changelog b/debian/changelog index 6fbc5241..f5ae2b79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ python-apt (0.8.2) UNRELEASED; urgency=low - updated, thanks to Nikola Nenadic (closes: #638308) * python/apt_pkgmodule.cc: - add apt_pkg.get_architectures() call + * apt/cache.py: + - remove "print" when creating dirs in apt.Cache(rootdir=dir), + thanks to Martin Pitt [ Tshepang Lekhonkhobe ] * rm usage of camelcase in cache.py doc (closes: #626617) -- cgit v1.2.3