summaryrefslogtreecommitdiff
path: root/apt/cache.py
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 /apt/cache.py
parent266037aa42b7c511d9c428767ee53300ec23faf1 (diff)
downloadpython-apt-0aa3f4f3ce25a499a332c23f9493e629f30013dc.tar.gz
re-work the logic in commit() to fail if installArchives() returns
a unexpected result
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py6
1 files changed, 5 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)