diff options
| author | Ben Finney <ben+debian@benfinney.id.au> | 2008-08-08 10:27:33 +1000 |
|---|---|---|
| committer | Ben Finney <ben+debian@benfinney.id.au> | 2008-08-08 10:27:33 +1000 |
| commit | 75676866d4bf394b3ba1ddef06e0c93f6da03242 (patch) | |
| tree | 7c28bf07c3500001e632d3859ef3b3853bc5fe4f /doc/examples/records.py | |
| parent | 7b14352c54b7acbf2a68240fa960e188c6e8742a (diff) | |
| download | python-apt-75676866d4bf394b3ba1ddef06e0c93f6da03242.tar.gz | |
'mapping.has_key' is deprecated, use current Python 'key in mapping' idiom.
Diffstat (limited to 'doc/examples/records.py')
| -rwxr-xr-x | doc/examples/records.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/records.py b/doc/examples/records.py index a7a87727..a0fc8dc4 100755 --- a/doc/examples/records.py +++ b/doc/examples/records.py @@ -7,7 +7,7 @@ cache = apt.Cache() for pkg in cache: if not pkg.candidateRecord: continue - if pkg.candidateRecord.has_key("Task"): + if "Task" in pkg.candidateRecord: print "Pkg %s is part of '%s'" % ( pkg.name, pkg.candidateRecord["Task"].split()) #print pkg.candidateRecord |
