diff options
| author | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:50:38 +1000 |
|---|---|---|
| committer | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:50:38 +1000 |
| commit | ad7bc46acd80451de21ce58450edb0f4367a5c79 (patch) | |
| tree | 12775f7901544a709f8d63079f1cd57fef00f5a8 /tests/pkgrecords.py | |
| parent | a953d82143f0ec979e18f17e8d9bbacbac954868 (diff) | |
| download | python-apt-ad7bc46acd80451de21ce58450edb0f4367a5c79.tar.gz | |
Fix code indentation to 4 spaces, to conform with PEP 8.
Diffstat (limited to 'tests/pkgrecords.py')
| -rw-r--r-- | tests/pkgrecords.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/pkgrecords.py b/tests/pkgrecords.py index 308505f7..72096463 100644 --- a/tests/pkgrecords.py +++ b/tests/pkgrecords.py @@ -9,30 +9,30 @@ import sys def main(): - apt_pkg.init() - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) - depcache.Init() - i=0 - print "Running PkgRecords test on all packages:" - for pkg in cache.Packages: - i += 1 - records = apt_pkg.GetPkgRecords(cache) - if len(pkg.VersionList) == 0: - #print "no available version, cruft" - continue - version = depcache.GetCandidateVer(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 - pass - print "\r%i/%i=%.3f%% " % (i,cache.PackageCount, (float(i)/float(cache.PackageCount)*100)), + apt_pkg.init() + cache = apt_pkg.GetCache() + depcache = apt_pkg.GetDepCache(cache) + depcache.Init() + i=0 + print "Running PkgRecords test on all packages:" + for pkg in cache.Packages: + i += 1 + records = apt_pkg.GetPkgRecords(cache) + if len(pkg.VersionList) == 0: + #print "no available version, cruft" + continue + version = depcache.GetCandidateVer(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 + pass + print "\r%i/%i=%.3f%% " % (i,cache.PackageCount, (float(i)/float(cache.PackageCount)*100)), if __name__ == "__main__": - main() - sys.exit(0) + main() + sys.exit(0) |
