summaryrefslogtreecommitdiff
path: root/doc/examples/indexfile.py
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-05 22:06:22 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-05 22:06:22 +0300
commit622812485150fa7864910ee2f710d5aab2fa9e6d (patch)
treeb3bc4fd72bb80e74ba5a60d8b3d47e610dff012e /doc/examples/indexfile.py
parent798846ab8337471998b0a4d796d6d409453faa7d (diff)
parentfdd173dd444098ed533cbcd541a7f10f228bc47e (diff)
downloadpython-apt-622812485150fa7864910ee2f710d5aab2fa9e6d.tar.gz
Merge git://anonscm.debian.org/apt/python-apt
Conflicts: debian/changelog python/apt_pkgmodule.cc
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")