summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/progress/base.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/apt/progress/base.py b/apt/progress/base.py
index 4df26f26..64bb22dc 100644
--- a/apt/progress/base.py
+++ b/apt/progress/base.py
@@ -223,13 +223,18 @@ class InstallProgress(object):
return
elif line.startswith('status'):
try:
- (base, pkgname, status, status_str) = line.split(": ", 3)
+ (base, pkgname, status, status_str) = line.split(":", 3)
except ValueError:
- (base, pkgname, status) = line.split(": ", 2)
+ (base, pkgname, status) = line.split(":", 2)
elif line.startswith('processing'):
- (status, status_str, pkgname) = line.split(": ", 2)
+ (status, status_str, pkgname) = line.split(":", 2)
self.processing(pkgname.strip(), status_str.strip())
+ # Always strip the status message
+ pkgname = pkgname.strip()
+ status_str = status_str.strip()
+ status = status.strip()
+
if status == 'pmerror' or status == 'error':
self.error(pkgname, status_str)
elif status == 'conffile-prompt' or status == 'pmconffile':
@@ -237,6 +242,7 @@ class InstallProgress(object):
if match:
self.conffile(match.group(1), match.group(2))
elif status == "pmstatus":
+ # FIXME: Float comparison
if float(percent) != self.percent or status_str != self.status:
self.status_change(pkgname, float(percent), status_str.strip())
self.percent = float(percent)