diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-04-19 17:30:57 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-04-19 17:30:57 +0200 |
| commit | d19943ea8489e06a1f5cd0bd545e0a0aeb4b8551 (patch) | |
| tree | a41904c7fbeb9065be976b5dd15661c931e644b2 /doc/source/examples | |
| parent | a7026989dd1ea3b70cbfc80cf92077efb2f52ba3 (diff) | |
| download | python-apt-d19943ea8489e06a1f5cd0bd545e0a0aeb4b8551.tar.gz | |
* Update the code to use the new classes.
Diffstat (limited to 'doc/source/examples')
| -rw-r--r-- | doc/source/examples/cache-packages.py | 2 | ||||
| -rw-r--r-- | doc/source/examples/cache-pkgfile.py | 2 | ||||
| -rw-r--r-- | doc/source/examples/missing-deps.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/doc/source/examples/cache-packages.py b/doc/source/examples/cache-packages.py index 1abe7cf2..0af96f7d 100644 --- a/doc/source/examples/cache-packages.py +++ b/doc/source/examples/cache-packages.py @@ -8,7 +8,7 @@ def main(): """Main.""" apt_pkg.InitConfig() apt_pkg.InitSystem() - cache = apt_pkg.GetCache() + cache = apt_pkg.Cache() print "Essential packages:" for pkg in cache.Packages: if pkg.Essential: diff --git a/doc/source/examples/cache-pkgfile.py b/doc/source/examples/cache-pkgfile.py index f25975d3..a7c22c97 100644 --- a/doc/source/examples/cache-pkgfile.py +++ b/doc/source/examples/cache-pkgfile.py @@ -5,7 +5,7 @@ import apt_pkg def main(): """Example for PackageFile()""" apt_pkg.init() - cache = apt_pkg.GetCache() + cache = apt_pkg.Cache() for pkgfile in cache.FileList: print 'Package-File:', pkgfile.FileName print 'Index-Type:', pkgfile.IndexType # 'Debian Package Index' diff --git a/doc/source/examples/missing-deps.py b/doc/source/examples/missing-deps.py index 3ca16e45..dd5eeb8a 100644 --- a/doc/source/examples/missing-deps.py +++ b/doc/source/examples/missing-deps.py @@ -35,7 +35,7 @@ def main(): apt_pkg.InitConfig() apt_pkg.InitSystem() - cache = apt_pkg.GetCache() + cache = apt_pkg.Cache() for pkg in sorted(cache.Packages, key=lambda pkg: pkg.Name): # pkg is from a list of packages, sorted by name. |
