From 47a1e41c1786a637c2bef222d0f304c6c19a2b8d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 3 Nov 2006 22:04:04 +0100 Subject: * apt/progress.py: - protect against unparsable strings from dpkg --- apt/progress.py | 7 ++++++- debian/changelog | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 08e83ae5..c864bf48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-apt (0.6.19ubuntu9.1) edgy-updates; urgency=low + + * protect against not-parsable strings send from dpkg (lp: 68553) + + -- Michael Vogt Fri, 27 Oct 2006 10:41:44 +0200 + python-apt (0.6.19ubuntu9) edgy; urgency=low * Reupload to restore dependency on python-central. -- cgit v1.2.3