summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-09-02 20:45:52 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-09-02 20:45:52 +0200
commit0aa3f4f3ce25a499a332c23f9493e629f30013dc (patch)
treecccdcf113276520b8577d046192ddbac32823fec
parent266037aa42b7c511d9c428767ee53300ec23faf1 (diff)
downloadpython-apt-0aa3f4f3ce25a499a332c23f9493e629f30013dc.tar.gz
re-work the logic in commit() to fail if installArchives() returns
a unexpected result
-rw-r--r--apt/cache.py6
-rw-r--r--debian/changelog2
2 files changed, 7 insertions, 1 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 828b167b..bb944041 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -314,8 +314,12 @@ class Cache(object):
res = self.installArchives(pm, installProgress)
if res == pm.ResultCompleted:
break
- if res == pm.ResultFailed:
+ elif res == pm.ResultFailed:
raise SystemError("installArchives() failed")
+ elif res == pm.ResultIncomplete:
+ pass
+ else:
+ raise SystemError("internal-error: unknown result code from InstallArchives: %s" % res)
# reload the fetcher for media swaping
fetcher.Shutdown()
return (res == pm.ResultCompleted)
diff --git a/debian/changelog b/debian/changelog
index bfba50e0..ada400bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ python-apt (0.7.13.3) UNRELEASED; urgency=low
[ Michael Vogt ]
* apt/cache.py:
- add actiongroup() method (backport from 0.7.92)
+ - re-work the logic in commit() to fail if installArchives() returns
+ a unexpected result
[ Sebastian Heinlein ]
* apt/package.py: