mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 13:55:04 +00:00
fix bug when system buffer gets filled
This commit is contained in:
@@ -34,9 +34,9 @@ def run(cmd, raw=True, debug=False, checkerr=False):
|
|||||||
LOG.dbg('exec: {}'.format(' '.join(cmd)))
|
LOG.dbg('exec: {}'.format(' '.join(cmd)))
|
||||||
p = subprocess.Popen(cmd, shell=False,
|
p = subprocess.Popen(cmd, shell=False,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
p.wait()
|
out, _ = p.communicate()
|
||||||
ret = p.returncode
|
ret = p.returncode
|
||||||
out = p.stdout.readlines()
|
out = out.splitlines(keepends=True)
|
||||||
lines = ''.join([x.decode('utf-8', 'replace') for x in out])
|
lines = ''.join([x.decode('utf-8', 'replace') for x in out])
|
||||||
if checkerr and ret != 0:
|
if checkerr and ret != 0:
|
||||||
c = ' '.join(cmd)
|
c = ' '.join(cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user