diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-15 14:47:15 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-15 14:47:15 +0200 |
| commit | dc759b837ad5d7790fd54f081c1b95ffe76b926c (patch) | |
| tree | 684413917a1233a7c9ff769023b7265cd14a771c | |
| parent | 5e184a04b41876a17f9a7e60a787c849955ad094 (diff) | |
| download | python-apt-dc759b837ad5d7790fd54f081c1b95ffe76b926c.tar.gz | |
apt/progress/__init__.py: Check for EINTR in select (Closes: #499296)
| -rw-r--r-- | apt/progress/__init__.py | 8 | ||||
| -rw-r--r-- | debian/changelog | 3 |
2 files changed, 9 insertions, 2 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: diff --git a/debian/changelog b/debian/changelog index 6ad40154..55d3a834 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ python-apt (0.7.92) UNRELEASED; urgency=low * Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149) * apt/package.py: Return VersionList objects in Package.versions, which are sequences and also provide features of mappings. (small API BREAK) + * apt/progress/__init__.py: Check for EINTR in select (Closes: #499296) [ Sebastian Heinlein ] * apt/progress.py: Extract the package name from the status message @@ -22,7 +23,7 @@ python-apt (0.7.92) UNRELEASED; urgency=low * python/progress.cc: - low level code for update_status_full and pulse_items() - -- Julian Andres Klode <jak@debian.org> Sun, 14 Jun 2009 16:23:39 +0200 + -- Julian Andres Klode <jak@debian.org> Mon, 15 Jun 2009 14:45:06 +0200 python-apt (0.7.91) experimental; urgency=low |
