From 9b2e18e4d1b95ef505f87561ac06aba50ada3609 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 21 Oct 2013 20:39:09 +0200 Subject: doc/examples/*.py: Update examples to the new API Closes: #639022 --- doc/examples/desc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc/examples/desc.py') diff --git a/doc/examples/desc.py b/doc/examples/desc.py index d50aa0ce..797459aa 100644 --- a/doc/examples/desc.py +++ b/doc/examples/desc.py @@ -4,22 +4,22 @@ import apt_pkg apt_pkg.init() -apt_pkg.Config.Set("APT::Acquire::Translation", "de") +apt_pkg.config.set("APT::Acquire::Translation", "de") cache = apt_pkg.Cache() depcache = apt_pkg.DepCache(cache) pkg = cache["gcc"] -cand = depcache.GetCandidateVer(pkg) +cand = depcache.get_candidate_ver(pkg) print cand desc = cand.TranslatedDescription print desc -print desc.FileList -(f, index) = desc.FileList.pop(0) +print desc.file_list +(f, index) = desc.file_list.pop(0) records = apt_pkg.PackageRecords(cache) -records.Lookup((f, index)) -desc = records.LongDesc +records.lookup((f, index)) +desc = records.long_desc print len(desc) print desc -- cgit v1.2.3