1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 16:08:54 +00:00

fix bug when system buffer gets filled

This commit is contained in:
deadc0de6
2020-08-23 13:58:33 +02:00
parent 5b2b05d353
commit 0e4c89bb9a

View File

@@ -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)