diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-02-07 20:04:59 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-02-07 20:04:59 +0100 |
| commit | fdb6cbdee070ae6671bdb5ed6b8a549aac1d8107 (patch) | |
| tree | 2018e27be1a8ee24a13965d5fba6852f90906450 /apt/cache.py | |
| parent | 662183288bbe0eac0578fa714e9eed564fd2f21d (diff) | |
| download | python-apt-fdb6cbdee070ae6671bdb5ed6b8a549aac1d8107.tar.gz | |
* Fix some places where the old API was still used:
- apt/utils.py: Completely ported, previous one was old-API from Ubuntu.
- apt/cache.py: Use the new progress classes instead of the old ones.
- apt/package.py: Various smaller issues fixed, probably caused by merge.
Diffstat (limited to 'apt/cache.py')
| -rw-r--r-- | apt/cache.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apt/cache.py b/apt/cache.py index 2a62ddce..24d63361 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -306,7 +306,7 @@ class Cache(object): try: if fetch_progress is None: - fetch_progress = apt.progress.FetchProgress() + fetch_progress = apt.progress.base.AcquireProgress() try: res = self._cache.update(fetch_progress, self._list, pulse_interval) @@ -358,9 +358,9 @@ class Cache(object): # which is less than optimal! if fetch_progress is None: - fetch_progress = apt.progress.FetchProgress() + fetch_progress = apt.progress.base.AcquireProgress() if install_progress is None: - install_progress = apt.progress.InstallProgress() + install_progress = apt.progress.base.InstallProgress() pm = apt_pkg.PackageManager(self._depcache) fetcher = apt_pkg.Acquire(fetch_progress) @@ -602,7 +602,7 @@ def _test(): """Internal test code.""" print "Cache self test" apt_pkg.init() - cache = Cache(apt.progress.OpTextProgress()) + cache = Cache(apt.progress.text.OpProgress()) cache.connect("cache_pre_change", cache_pre_changed) cache.connect("cache_post_change", cache_post_changed) print ("aptitude" in cache) @@ -627,7 +627,7 @@ def _test(): os.mkdir(dir) apt_pkg.config.set("Dir::Cache::Archives", "/tmp/pytest") pm = apt_pkg.PackageManager(cache._depcache) - fetcher = apt_pkg.Acquire(apt.progress.TextFetchProgress()) + fetcher = apt_pkg.Acquire(apt.progress.text.AcquireProgress()) cache._fetch_archives(fetcher, pm) #sys.exit(1) @@ -644,7 +644,7 @@ def _test(): print len(filtered) print "Testing filtered cache (no argument)" - filtered = FilteredCache(progress=apt.progress.OpTextProgress()) + filtered = FilteredCache(progress=apt.progress.base.OpProgress()) filtered.cache.connect("cache_pre_change", cache_pre_changed) filtered.cache.connect("cache_post_change", cache_post_changed) filtered.cache.upgrade() |
