summaryrefslogtreecommitdiff
path: root/doc/examples/records.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/records.py')
-rwxr-xr-xdoc/examples/records.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/examples/records.py b/doc/examples/records.py
index ef04b555..a0fc8dc4 100755
--- a/doc/examples/records.py
+++ b/doc/examples/records.py
@@ -5,8 +5,9 @@ import apt
cache = apt.Cache()
for pkg in cache:
- if not pkg.candidateRecord:
- continue
- if pkg.candidateRecord.has_key("Task"):
- print "Pkg %s is part of '%s'" % (pkg.name, pkg.candidateRecord["Task"].split())
- #print pkg.candidateRecord
+ if not pkg.candidateRecord:
+ continue
+ if "Task" in pkg.candidateRecord:
+ print "Pkg %s is part of '%s'" % (
+ pkg.name, pkg.candidateRecord["Task"].split())
+ #print pkg.candidateRecord