summaryrefslogtreecommitdiff
path: root/apt/debfile.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-04-13 18:27:43 +0200
committerJulian Andres Klode <jak@debian.org>2009-04-13 18:27:43 +0200
commit506cb021d62e643fba38ddb4b84572a86cb3a3ba (patch)
tree364b053d1560897d5b24dfd8950df341f0f63288 /apt/debfile.py
parent6c3e74bdf3a8bd6aced0a2ddb38c1cc7b22ec655 (diff)
downloadpython-apt-506cb021d62e643fba38ddb4b84572a86cb3a3ba.tar.gz
* python/tag.cc: Support 'key in mapping' for TagSections
Support the replacement of mapping.has_key() for sections, and update the usage in apt/package.py and apt/debfile accordingly. This is implemented by extending the TagSecType with sequence methods, but only settings the contains method there. The TagSecGetAttr() function has been removed and replaced by the use of the tp_methods slot.
Diffstat (limited to 'apt/debfile.py')
-rw-r--r--apt/debfile.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index 0406a250..8d4f534c 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -463,18 +463,18 @@ class DscSrcPackage(DebPackage):
try:
while tagfile.Step() == 1:
for tag in depends_tags:
- if not sec.has_key(tag):
+ if not tag in sec:
continue
self._depends.extend(apt_pkg.ParseSrcDepends(sec[tag]))
for tag in conflicts_tags:
- if not sec.has_key(tag):
+ if not tag in sec:
continue
self._conflicts.extend(apt_pkg.ParseSrcDepends(sec[tag]))
- if sec.has_key('Source'):
+ if 'Source' in sec:
self.pkgname = sec['Source']
- if sec.has_key('Binary'):
+ if 'Binary' in sec:
self.binaries = sec['Binary'].split(', ')
- if sec.has_key('Version'):
+ if 'Version' in sec:
self._sections['Version'] = sec['Version']
finally:
del sec