diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-08-04 16:15:36 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-08-04 16:15:36 +0000 |
| commit | 22b6039107124d9e2fb9f3185d1663fac482f25e (patch) | |
| tree | e7820e51df0b152d1e750b377b8fd2cc85405523 /apt | |
| parent | ad3b844320f099f40c475f39579a9baf578785c6 (diff) | |
| download | python-apt-22b6039107124d9e2fb9f3185d1663fac482f25e.tar.gz | |
* downloads can be canceld now (in FetchProgress::Pulse)
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/__init__.py | 2 | ||||
| -rw-r--r-- | apt/cache.py | 6 | ||||
| -rw-r--r-- | apt/progress.py | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/apt/__init__.py b/apt/__init__.py index eb4e3268..2a478b34 100644 --- a/apt/__init__.py +++ b/apt/__init__.py @@ -7,7 +7,7 @@ import os from apt.package import Package from apt.cache import Cache from apt.progress import OpProgress, FetchProgress, InstallProgress, CdromProgress -from apt_pkg import SizeToStr, VersionCompare +from apt_pkg import SizeToStr, TimeToStr, VersionCompare # init the package system apt_pkg.init() diff --git a/apt/cache.py b/apt/cache.py index 50a896e6..83f0bd3d 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -103,6 +103,12 @@ class Cache(object): self._depcache.Upgrade(distUpgrade) self.cachePostChange() + def update(self, fetchProgress=None, opProgress=None): + if(opProgress != None): + self._cache.Update(fetchProgress, opProgress); + else: + self._cache.Update(fetchProgress); + def commit(self, fprogress, iprogress): """ Apply the marked changes to the cache """ self._depcache.Commit(fprogress, iprogress) diff --git a/apt/progress.py b/apt/progress.py index 4e5ffe4d..70696b6b 100644 --- a/apt/progress.py +++ b/apt/progress.py @@ -61,11 +61,13 @@ class FetchProgress: pass def pulse(self): - pass + return True def mediaChange(self, medium, drive): pass + + class InstallProgress: """ Report the install progress Subclass this class to implement install progress reporting |
