summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-09-15 14:16:54 +0200
committerJulian Andres Klode <jak@debian.org>2009-09-15 14:16:54 +0200
commit92ee136013b7432b0e21694098b17f3d0a4f7be5 (patch)
treec8081733470fb08882b48d87703394e6a58ada70 /apt/cache.py
parent7fe83be76c6aac0778225a0106b46293d34543bf (diff)
parent7acb16fc4baa43cf2cbbc4de948973bdc099d878 (diff)
downloadpython-apt-92ee136013b7432b0e21694098b17f3d0a4f7be5.tar.gz
merge from mvo
* apt/cache.py: - re-work the logic in commit() to fail if installArchives() returns a unexpected result * apt/progress/__init__.py: - catch exceptions in pm.DoInstall()
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)