summaryrefslogtreecommitdiff
path: root/apt/progress
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-12-01 12:03:16 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-12-01 12:03:16 +0100
commitc4c1197922edb4f82390f7e0f125be34863d24d3 (patch)
tree8d26be69b7b2a44c58f5e90eb33cf10b83114e90 /apt/progress
parent4600b96f047154b4adadfc8f862c0f6201d21bdc (diff)
downloadpython-apt-c4c1197922edb4f82390f7e0f125be34863d24d3.tar.gz
* apt/progress/base.py:
- write exception text to stderr to avoid hidding exceptions like "pre-configure failed" from libapt (thanks to Jean-Baptiste Lallement)
Diffstat (limited to 'apt/progress')
-rw-r--r--apt/progress/base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt/progress/base.py b/apt/progress/base.py
index 97375431..4943978c 100644
--- a/apt/progress/base.py
+++ b/apt/progress/base.py
@@ -27,6 +27,7 @@ import fcntl
import os
import re
import select
+import sys
import apt_pkg
@@ -196,7 +197,8 @@ class InstallProgress(object):
os._exit(os.spawnlp(os.P_WAIT, "dpkg", "dpkg", "--status-fd",
str(self.write_stream.fileno()), "-i",
obj))
- except Exception:
+ except Exception as e:
+ sys.stderr.write("%s\n" % e)
os._exit(apt_pkg.PackageManager.RESULT_FAILED)
self.child_pid = pid