[python-debian/master 35/36] In Python 2, restore Deb822Dict.has_key method for compatibility. (Closes: #686731)
Colin Watson
cjwatson at canonical.com
Mon Oct 8 07:41:24 UTC 2012
---
debian/changelog | 8 ++++++++
lib/debian/deb822.py | 5 ++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8e1255d..3d78ac6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-debian (0.1.21+nmu2) UNRELEASED; urgency=low
+
+ * Non-maintainer upload.
+ * In Python 2, restore Deb822Dict.has_key method for compatibility.
+ (Closes: #686731)
+
+ -- Colin Watson <cjwatson at ubuntu.com> Wed, 05 Sep 2012 11:27:07 +0100
+
python-debian (0.1.21+nmu1) unstable; urgency=low
* Non-maintainer upload.
diff --git a/lib/debian/deb822.py b/lib/debian/deb822.py
index be9a15b..bd910d6 100644
--- a/lib/debian/deb822.py
+++ b/lib/debian/deb822.py
@@ -270,7 +270,10 @@ class Deb822Dict(_mutable_mapping_mixin, object):
def __contains__(self, key):
key = _strI(key)
return key in self.__keys
-
+
+ if sys.version < '3':
+ has_key = __contains__
+
### END _mutable_mapping_mixin methods
def __repr__(self):
--
1.7.2.5
More information about the pkg-python-debian-commits
mailing list