summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-11-18 12:01:37 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-11-18 12:01:37 +0000
commit2fa652df49918cbfd8def4868b327bab3b30feb9 (patch)
tree2d6eb8127570763373a0862d3650bc02854d8ac0 /doc
parentbf020b8b55739672ce5335850db921277539327e (diff)
downloadpython-apt-2fa652df49918cbfd8def4868b327bab3b30feb9.tar.gz
* added stat constants to the acquire-item interface
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/acquire.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/examples/acquire.py b/doc/examples/acquire.py
index f920e5e9..0031fa18 100644
--- a/doc/examples/acquire.py
+++ b/doc/examples/acquire.py
@@ -16,7 +16,7 @@ try:
os.mkdir("/tmp/pyapt-test/partial")
except OSError:
pass
-apt_pkg.Config.Set("Dir::Cache::archives","/tmp/pyapt-test")
+#apt_pkg.Config.Set("Dir::Cache::archives","/tmp/pyapt-test")
pkg = cache["3ddesktop"]
depcache.MarkInstall(pkg)
@@ -37,6 +37,10 @@ for item in fetcher.Items:
item.Status,
item.Complete,
item.IsTrusted)
+ if item.Status == item.StatError:
+ print "Some error ocured: '%s'" % item.ErrorText
+ if item.Complete == False:
+ print "No error, still nothing downloaded"
print