summaryrefslogtreecommitdiff
path: root/doc/examples/indexfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/indexfile.py')
-rw-r--r--doc/examples/indexfile.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/examples/indexfile.py b/doc/examples/indexfile.py
index cc5070aa..a9282bf5 100644
--- a/doc/examples/indexfile.py
+++ b/doc/examples/indexfile.py
@@ -5,18 +5,18 @@ import apt_pkg
apt_pkg.init()
sources = apt_pkg.SourceList()
-sources.ReadMainList()
+sources.read_main_list()
cache = apt_pkg.Cache()
depcache = apt_pkg.DepCache(cache)
pkg = cache["libimlib2"]
-cand = depcache.GetCandidateVer(pkg)
-for (f, i) in cand.FileList:
- index = sources.FindIndex(f)
+cand = depcache.get_candidate_ver(pkg)
+for (f, i) in cand.file_list:
+ index = sources.find_index(f)
print index
if index:
- print index.Size
- print index.IsTrusted
- print index.Exists
- print index.HasPackages
- print index.ArchiveURI("some/path")
+ print index.size
+ print index.is_trusted
+ print index.exists
+ print index.Haspackages
+ print index.archive_uri("some/path")