Skip to content

Commit b3f873a

Browse files
smokephilByron
authored andcommitted
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
1 parent b719e18 commit b3f873a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git/cmd.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
from subprocess import (
1313
call,
1414
Popen,
15-
PIPE
15+
PIPE,
16+
DEVNULL
1617
)
1718
import subprocess
1819
import threading
@@ -873,7 +874,7 @@ def execute(self,
873874
env=env,
874875
cwd=cwd,
875876
bufsize=-1,
876-
stdin=istream,
877+
stdin=istream or DEVNULL,
877878
stderr=PIPE,
878879
stdout=stdout_sink,
879880
shell=shell is not None and shell or self.USE_SHELL,

0 commit comments

Comments
 (0)