From 0e4c89bb9a01d3e6d8361b6e5017ed84f179c7b2 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 23 Aug 2020 13:58:33 +0200 Subject: [PATCH] fix bug when system buffer gets filled --- dotdrop/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotdrop/utils.py b/dotdrop/utils.py index 9c4baa1..705c3fc 100644 --- a/dotdrop/utils.py +++ b/dotdrop/utils.py @@ -34,9 +34,9 @@ def run(cmd, raw=True, debug=False, checkerr=False): LOG.dbg('exec: {}'.format(' '.join(cmd))) p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - p.wait() + out, _ = p.communicate() ret = p.returncode - out = p.stdout.readlines() + out = out.splitlines(keepends=True) lines = ''.join([x.decode('utf-8', 'replace') for x in out]) if checkerr and ret != 0: c = ' '.join(cmd)