summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/progress/__init__.py5
-rw-r--r--debian/changelog6
2 files changed, 10 insertions, 1 deletions
diff --git a/apt/progress/__init__.py b/apt/progress/__init__.py
index 8a9eb86f..8694de77 100644
--- a/apt/progress/__init__.py
+++ b/apt/progress/__init__.py
@@ -246,7 +246,10 @@ class InstallProgress(DumbInstallProgress):
return
try:
while not self.read.endswith("\n"):
- self.read += os.read(self.statusfd.fileno(), 1)
+ r = os.read(self.statusfd.fileno(), 1)
+ if not r:
+ return
+ self.read += r
except OSError, (errno_, errstr):
# resource temporarly unavailable is ignored
if errno_ != errno.EAGAIN and errno_ != errno.EWOULDBLOCK:
diff --git a/debian/changelog b/debian/changelog
index 48d5b78d..7df51cf6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,11 @@
python-apt (0.7.13.4) UNRELEASED; urgency=low
+ [ Colin Watson ]
+ * apt/progress/__init__.py:
+ - Fix InstallProgress.updateInterface() to cope with read() returning 0
+ on non-blocking file descriptors (LP: #491027).
+
+ [ Michael Vogt ]
* po/zh_CN.po:
- updated, thanks to Feng Chao
* python/progress.cc: