summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-11-03 22:04:49 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-11-03 22:04:49 +0100
commit4ae6dbf9a654189b1f07e8056fff9a3b877a6e2d (patch)
tree863acce589946e5e742fe95b1309f6f3ced9449f
parent2bd5e2dd14365d8d7e72b7671ed57c6b681b9072 (diff)
downloadpython-apt-4ae6dbf9a654189b1f07e8056fff9a3b877a6e2d.tar.gz
* apt/progress.py:
- protect against unparsable strings send from dpkg
-rw-r--r--apt/progress.py7
-rw-r--r--debian/changelog1
2 files changed, 7 insertions, 1 deletions
diff --git a/apt/progress.py b/apt/progress.py
index 8ac0e1dc..5169adf7 100644
--- a/apt/progress.py
+++ b/apt/progress.py
@@ -175,7 +175,12 @@ class InstallProgress(DumbInstallProgress):
if self.read.endswith("\n"):
s = self.read
#print s
- (status, pkg, percent, status_str) = string.split(s, ":")
+ try:
+ (status, pkg, percent, status_str) = string.split(s, ":",3)
+ except ValueError, e:
+ # silently ignore lines that can't be parsed
+ self.read = ""
+ return
#print "percent: %s %s" % (pkg, float(percent)/100.0)
if status == "pmerror":
self.error(pkg,status_str)
diff --git a/debian/changelog b/debian/changelog
index 0dfa9381..9451428c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ python-apt (0.6.21) unstable; urgency=low
instead. This fixes a nasty segfault with python2.5
(lp: 63226)
* debian/rules: Remove dh_python call.
+ * protect against not-parsable strings send from dpkg (lp: 68553)
--