summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/cache.py11
-rw-r--r--debian/changelog2
2 files changed, 8 insertions, 5 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 2f097f6b..2a62ddce 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -307,11 +307,12 @@ class Cache(object):
try:
if fetch_progress is None:
fetch_progress = apt.progress.FetchProgress()
- res = self._cache.update(fetch_progress, self._list,
- pulse_interval)
- if res == apt_pkg.Acquire.RESULT_CANCELLED and raise_on_error:
- raise FetchCancelledException()
- if res == apt_pkg.Acquire.RESULT_FAILED and raise_on_error:
+ try:
+ res = self._cache.update(fetch_progress, self._list,
+ pulse_interval)
+ except SystemError, e:
+ raise FetchFailedException(e)
+ if not res and raise_on_error:
raise FetchFailedException()
else:
return res
diff --git a/debian/changelog b/debian/changelog
index 6f5cd696..95ca5b41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
python-apt (0.7.93.1) UNRELEASED; urgency=low
* Fix reference counting for old progress classes (Closes: #566370).
+ * apt/cache.py:
+ - Fix Cache.update() to not raise errors on successful updates.
-- Julian Andres Klode <jak@debian.org> Sat, 23 Jan 2010 15:35:55 +0100