summaryrefslogtreecommitdiff
path: root/doc/source/examples/cache-pkgfile.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-03-23 14:18:44 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-03-23 14:18:44 +0100
commit37650a078f5504dfbc6622d2c06f4435a3302dd4 (patch)
tree35d7df75535420cbe0712a5f7b7b66d61f5e44d1 /doc/source/examples/cache-pkgfile.py
parent2aa709e41d8896ef897863ea9181c409c4c87a8c (diff)
parent3a08cfb10590d5cf5df1f45d94a424ef6a0f674b (diff)
downloadpython-apt-37650a078f5504dfbc6622d2c06f4435a3302dd4.tar.gz
merged from lp:~mvo/python-apt/mvo
Diffstat (limited to 'doc/source/examples/cache-pkgfile.py')
-rw-r--r--doc/source/examples/cache-pkgfile.py16
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: