From a12cf158daadb91ce4d4e24fdb156910eee42688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 18 Sep 2014 07:39:19 +0200 Subject: [PATCH] backups: handle empty tar output --- core/backup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/backup.py b/core/backup.py index d5239b4b..2c189e31 100644 --- a/core/backup.py +++ b/core/backup.py @@ -837,8 +837,14 @@ class ExtractWorker(Process): return if self.tar2_process.poll() is None: - new_lines = self.tar2_process.stderr\ + try: + new_lines = self.tar2_process.stderr\ .read(MAX_STDERR_BYTES).splitlines() + except IOError as e: + if e.errno == errno.EAGAIN: + return + else: + raise else: new_lines = self.tar2_process.stderr.readlines()