Browse Source

ProcessController.py (run): Use default Popen buffer size to

avoid Python 3.8 runtime warnings:

  "RuntimeWarning: line buffering (buffering=1) isn't supported in binary
   mode, the default buffer size will be used"
1.0.4-release-candidate
Ben Elliston 4 years ago
committed by Chris
parent
commit
963197113b
1 changed files with 2 additions and 2 deletions
  1. 4
      gooey/gui/processor.py

4
gooey/gui/processor.py

@ -48,12 +48,12 @@ class ProcessController(object):
try:
self._process = subprocess.Popen(
command.encode(sys.getfilesystemencoding()),
bufsize=1, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stderr=subprocess.STDOUT, shell=self.shell_execution, env=env)
except:
self._process = subprocess.Popen(
command,
bufsize=1, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stderr = subprocess.STDOUT, shell = self.shell_execution, env=env)
t = Thread(target=self._forward_stdout, args=(self._process,))

Loading…
Cancel
Save