diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-12-07 11:22:30 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-12-07 11:22:30 +0000 |
| commit | a7073554674b0e9aaf262e4d981fbbb20713ac4a (patch) | |
| tree | 429fbfb7b44cdf908e1a103501032793ed86e44d /doc | |
| parent | cce2b71c2fd64c8587238178c27a049ec450ce07 (diff) | |
| download | python-apt-a7073554674b0e9aaf262e4d981fbbb20713ac4a.tar.gz | |
* InstallProgress.{error,conffile}() functions added
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/examples/inst.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/examples/inst.py b/doc/examples/inst.py index 66b61c54..0e91c28f 100644 --- a/doc/examples/inst.py +++ b/doc/examples/inst.py @@ -19,13 +19,20 @@ class TextInstallProgress(InstallProgress): sys.stdout.write("\r[%s] %s\n" %(self.percent, self.status)) sys.stdout.flush() self.last = self.percent + def conffile(self,current,new): + print "conffile prompt: %s %s" % (current,new) + def error(self, errorstr): + print "got dpkg error: '%s'" % errorstr cache = apt.Cache(apt.progress.OpTextProgress()) fprogress = apt.progress.TextFetchProgress() iprogress = TextInstallProgress() -pkg = cache["base-config"] +pkg = cache["test-package"] +pkg.markUpgrade() +cache.commit(fprogress,iprogress) +sys.exit(1) # install or remove, the importend thing is to keep us busy :) if pkg.isInstalled: |
