mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 23:04:24 +01:00
Merge pull request #96 from joohoi/fix_95
Fix issue of breaking process when a child process of subprocess closes stdout pipe
This commit is contained in:
@@ -48,8 +48,10 @@ class Task(object):
|
||||
|
||||
def _run_task(self, t=False):
|
||||
if t:
|
||||
s = subprocess.Popen(self.task, shell=True, stdout=subprocess.PIPE)
|
||||
out = s.stdout.readline().decode("utf-8")
|
||||
s = subprocess.Popen(self.task, shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
encoding="utf-8")
|
||||
out, _ = s.communicate()
|
||||
if out != "":
|
||||
t.write(out)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user