From b3f873a1458223c075fdde6c85eb656648bcdcae Mon Sep 17 00:00:00 2001 From: smokephil Date: Fri, 21 Jan 2022 09:43:40 +0100 Subject: [PATCH] set unassigned stdin to improve pyinstaller compatibility To create a window application with pyinstaller, all suprocess input and output streams must be assigned and must not be None. https://stackoverflow.com/a/51706087/7076612 --- git/cmd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git/cmd.py b/git/cmd.py index 8fb10742f..4f0569879 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -12,7 +12,8 @@ from subprocess import ( call, Popen, - PIPE + PIPE, + DEVNULL ) import subprocess import threading @@ -873,7 +874,7 @@ def execute(self, env=env, cwd=cwd, bufsize=-1, - stdin=istream, + stdin=istream or DEVNULL, stderr=PIPE, stdout=stdout_sink, shell=shell is not None and shell or self.USE_SHELL,