diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-02-17 16:17:36 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-02-17 16:17:36 +0100 |
| commit | d1b2c0fbd34cee0ffced8270149b87def7675b2a (patch) | |
| tree | f4b8a14fc619b2e6ea297385e289b2549f6f21a4 /doc/source/examples/cache-pkgfile.py | |
| parent | c62bdd0b1b633b134ba551847da0c1e8d12115c2 (diff) | |
| parent | 930f6a2899b0b410777397fb206a8eba8c99100c (diff) | |
| download | python-apt-d1b2c0fbd34cee0ffced8270149b87def7675b2a.tar.gz | |
merged from the debian-sid branch
Diffstat (limited to 'doc/source/examples/cache-pkgfile.py')
| -rw-r--r-- | doc/source/examples/cache-pkgfile.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/source/examples/cache-pkgfile.py b/doc/source/examples/cache-pkgfile.py index f25975d3..f4cc2e66 100644 --- a/doc/source/examples/cache-pkgfile.py +++ b/doc/source/examples/cache-pkgfile.py @@ -5,20 +5,20 @@ import apt_pkg def main(): """Example for PackageFile()""" apt_pkg.init() - cache = apt_pkg.GetCache() - for pkgfile in cache.FileList: - print 'Package-File:', pkgfile.FileName - print 'Index-Type:', pkgfile.IndexType # 'Debian Package Index' - if pkgfile.NotSource: + cache = apt_pkg.Cache() + for pkgfile in cache.file_list: + print 'Package-File:', pkgfile.filename + print 'Index-Type:', pkgfile.index_type # 'Debian Package Index' + if pkgfile.not_source: print 'Source: None' else: - if pkgfile.Site: + if pkgfile.site: # There is a source, and a site, print the site - print 'Source:', pkgfile.Site + print 'Source:', pkgfile.site else: # It seems to be a local repository print 'Source: Local package file' - if pkgfile.NotAutomatic: + if pkgfile.not_automatic: # The system won't be updated automatically (eg. experimental) print 'Automatic: No' else: |
