From dc759b837ad5d7790fd54f081c1b95ffe76b926c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 15 Jun 2009 14:47:15 +0200 Subject: apt/progress/__init__.py: Check for EINTR in select (Closes: #499296) --- apt/progress/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apt/progress') 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: -- cgit v1.2.3