diff options
| author | Julian Andres Klode <jak@debian.org> | 2013-10-21 20:39:09 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2013-10-21 20:39:09 +0200 |
| commit | 9b2e18e4d1b95ef505f87561ac06aba50ada3609 (patch) | |
| tree | b671b576d80b19d60f539788a74feceecf9031e8 /doc/examples/print_uris.py | |
| parent | 8a67219266605b39a522aee08bf7cd3b0b6c3a8c (diff) | |
| download | python-apt-9b2e18e4d1b95ef505f87561ac06aba50ada3609.tar.gz | |
doc/examples/*.py: Update examples to the new API
Closes: #639022
Diffstat (limited to 'doc/examples/print_uris.py')
| -rwxr-xr-x | doc/examples/print_uris.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/examples/print_uris.py b/doc/examples/print_uris.py index c64a4b54..06043e4a 100755 --- a/doc/examples/print_uris.py +++ b/doc/examples/print_uris.py @@ -8,15 +8,15 @@ import apt_pkg cache = apt.Cache() -upgradable = filter(lambda p: p.isUpgradable, cache) +upgradable = filter(lambda p: p.is_upgradable, cache) for pkg in upgradable: pkg._lookupRecord(True) - path = apt_pkg.TagSection(pkg._records.Record)["Filename"] - cand = pkg._depcache.GetCandidateVer(pkg._pkg) - for (packagefile, i) in cand.FileList: - indexfile = cache._list.FindIndex(packagefile) + path = apt_pkg.TagSection(pkg._records.record)["Filename"] + cand = pkg._depcache.get_candidate_ver(pkg._pkg) + for (packagefile, i) in cand.file_list: + indexfile = cache._list.find_index(packagefile) if indexfile: - uri = indexfile.ArchiveURI(path) + uri = indexfile.archive_uri(path) print uri |
