diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-07-31 11:22:27 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-07-31 11:22:27 +0200 |
| commit | d6343253aa4025376b9a8bb2b2fa140819def747 (patch) | |
| tree | 5937a4ab0a036f14d649f1fd78486c40f9738554 | |
| parent | c085ac239354d78c3093049a4c48a27f514c6da2 (diff) | |
| download | python-apt-d6343253aa4025376b9a8bb2b2fa140819def747.tar.gz | |
* apt/cache.py:
- support "in" in apt.Cache() (LP: #251587)
| -rw-r--r-- | apt/cache.py | 3 | ||||
| -rw-r--r-- | debian/changelog | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/apt/cache.py b/apt/cache.py index 384afe31..bbf2165b 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -101,6 +101,9 @@ class Cache(object): def has_key(self, key): return self._dict.has_key(key) + def __contains__(self, key): + return key in self._dict + def __len__(self): return len(self._dict) diff --git a/debian/changelog b/debian/changelog index 7bc2630e..86e5b0c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ python-apt (0.7.7.2) UNRELEASED; urgency=low * python/cache.cc: - fix crash if Ver.PriorityType() returns NULL + * apt/cache.py: + - support "in" in apt.Cache() (LP: #251587) -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 30 Jul 2008 10:24:30 +0200 |
