backup: do not try to read tar's stderr past EOF

If EOF is reached on tar's stderr, stop reading it, even if didn't found
expected data. Log this event.

This may happen when tar output some fatal error, instead of filelist.
This commit is contained in:
Marek Marczykowski-Górecki 2017-10-16 04:07:27 +02:00
父節點 7a6e8d04b8
當前提交 513163276f
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 063938BA42CFA724

查看文件

@ -466,6 +466,9 @@ class ExtractWorker3(Process):
# yet, so it will hang on write() when the output pipe fill up).
while True:
line = tar2_process.stderr.readline()
if not line:
self.log.warning('EOF from tar before got file size info')
break
line = line.decode()
if _tar_msg_re.match(line):
self.log.debug('tar2_stderr: %s', line)