summaryrefslogtreecommitdiff
path: root/apt/progress
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-15 14:47:15 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-15 14:47:15 +0200
commitdc759b837ad5d7790fd54f081c1b95ffe76b926c (patch)
tree684413917a1233a7c9ff769023b7265cd14a771c /apt/progress
parent5e184a04b41876a17f9a7e60a787c849955ad094 (diff)
downloadpython-apt-dc759b837ad5d7790fd54f081c1b95ffe76b926c.tar.gz
apt/progress/__init__.py: Check for EINTR in select (Closes: #499296)
Diffstat (limited to 'apt/progress')
-rw-r--r--apt/progress/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt/progress/__init__.py b/apt/progress/__init__.py
index a6287dc4..3c5d4588 100644
--- a/apt/progress/__init__.py
+++ b/apt/progress/__init__.py
@@ -116,6 +116,7 @@ class FetchProgress(object):
This happens eg. when the downloads fails or is completed.
"""
+
def update_status_full(self, uri, descr, short_descr, status, file_size,
partial_size):
"""Called when the status of an item changes.
@@ -314,7 +315,12 @@ class InstallProgress(DumbInstallProgress):
def wait_child(self):
"""Wait for child progress to exit."""
while True:
- select.select([self.statusfd], [], [], self.select_timeout)
+ try:
+ select.select([self.statusfd], [], [], self.select_timeout)
+ except select.error, e:
+ if e[0] != errno.EINTR:
+ raise
+
self.update_interface()
(pid, res) = os.waitpid(self.child_pid, os.WNOHANG)
if pid == self.child_pid: