summaryrefslogtreecommitdiff
path: root/apt/progress
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-27 10:21:51 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-27 10:21:51 +0200
commitf8a5f4a2fef199f112135c2bb24515b569634085 (patch)
treedb15813bad5cdf78bed543059ad3204fd36c7845 /apt/progress
parente803243b0ba177176eba83e9037a8bcf3913740d (diff)
parent2e240897e33a62f1d8cb62ee15ca22669e42da0a (diff)
downloadpython-apt-f8a5f4a2fef199f112135c2bb24515b569634085.tar.gz
* apt/progress/__init__.py:
- Exception handling fixes in InstallProgress class.
Diffstat (limited to 'apt/progress')
-rw-r--r--apt/progress/__init__.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/apt/progress/__init__.py b/apt/progress/__init__.py
index 3be197f7..b582ad22 100644
--- a/apt/progress/__init__.py
+++ b/apt/progress/__init__.py
@@ -286,11 +286,20 @@ class InstallProgress(DumbInstallProgress):
def waitChild(self):
"""Wait for child progress to exit."""
while True:
- select.select([self.statusfd], [], [], self.selectTimeout)
- self.updateInterface()
- (pid, res) = os.waitpid(self.child_pid, os.WNOHANG)
- if pid == self.child_pid:
+ try:
+ select.select([self.statusfd], [], [], self.selectTimeout)
+ except select.error, (errno_, errstr):
+ if errno_ != errno.EINTR:
+ raise
break
+ self.updateInterface()
+ try:
+ (pid, res) = os.waitpid(self.child_pid, os.WNOHANG)
+ if pid == self.child_pid:
+ break
+ except OSError, (errno_, errstr):
+ if errno_ != errno.EINTR:
+ raise
return res
def run(self, pm):