Skip to content

Commit 541db44

Browse files
authored
Update common.py
fix transfer buffer process
1 parent 16d51b3 commit 541db44

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

libtmux/common.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,7 @@ def __init__(self, *args, **kwargs):
205205
self.process = subprocess.Popen(
206206
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
207207
)
208-
self.process.wait()
209-
stdout = self.process.stdout.read()
210-
self.process.stdout.close()
211-
stderr = self.process.stderr.read()
212-
self.process.stderr.close()
208+
stdout, stderr = self.process.communicate()
213209
returncode = self.process.returncode
214210
except Exception as e:
215211
logger.error('Exception for %s: \n%s' % (subprocess.list2cmdline(cmd), e))

0 commit comments

Comments
 (0)