diff options
| author | Julian Andres Klode <jak@debian.org> | 2013-10-21 20:43:18 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2013-10-21 20:43:18 +0200 |
| commit | 247bdb9c62efb2f7d68c71a18e84addda3aec7bc (patch) | |
| tree | 39acb4b0187a02a059402a1c0153c03aab79f28b /tests/old/pkgrecords.py | |
| parent | 9b2e18e4d1b95ef505f87561ac06aba50ada3609 (diff) | |
| download | python-apt-247bdb9c62efb2f7d68c71a18e84addda3aec7bc.tar.gz | |
tests/old/*.py: Update to new API as well
Diffstat (limited to 'tests/old/pkgrecords.py')
| -rw-r--r-- | tests/old/pkgrecords.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/old/pkgrecords.py b/tests/old/pkgrecords.py index 2fe6ad20..9e06d44c 100644 --- a/tests/old/pkgrecords.py +++ b/tests/old/pkgrecords.py @@ -12,27 +12,27 @@ def main(): apt_pkg.init() cache = apt_pkg.Cache() depcache = apt_pkg.DepCache(cache) - depcache.Init() + depcache.init() i=0 print "Running PkgRecords test on all packages:" - for pkg in cache.Packages: + for pkg in cache.packages: i += 1 records = apt_pkg.PackageRecords(cache) - if len(pkg.VersionList) == 0: + if len(pkg.version_list) == 0: #print "no available version, cruft" continue - version = depcache.GetCandidateVer(pkg) + version = depcache.get_candidate_ver(pkg) if not version: continue - file, index = version.FileList.pop(0) - if records.Lookup((file, index)): - #print records.FileName - x = records.FileName - y = records.LongDesc + file, index = version.file_list.pop(0) + if records.lookup((file, index)): + #print records.filename + x = records.filename + y = records.long_desc pass print "\r%i/%i=%.3f%% " % ( - i, cache.PackageCount, - (float(i) / float(cache.PackageCount) * 100)), + i, cache.package_count, + (float(i) / float(cache.package_count) * 100)), if __name__ == "__main__": |
