kopia lustrzana https://github.com/inkstitch/inkstitch
fix stub output handling
rodzic
52bf2c80b6
commit
754c2aa63a
12
stub.py
12
stub.py
|
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
|
||||
# ink/stitch
|
||||
#
|
||||
# stub.py: pyinstaller execution stub
|
||||
|
|
@ -15,7 +16,6 @@ import traceback
|
|||
# This Python script exists only to execute the actual extension binary. It
|
||||
# can be copied to, e.g., "embroider_params.py", in which case it will look
|
||||
# for a binary at inkstitch/bin/embroider_params.
|
||||
|
||||
script_name = os.path.basename(__file__)
|
||||
|
||||
if script_name.endswith('.py'):
|
||||
|
|
@ -48,12 +48,12 @@ if sys.platform == "win32":
|
|||
import msvcrt
|
||||
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
|
||||
|
||||
stdout = stdout.strip()
|
||||
if stdout:
|
||||
print stdout.strip(),
|
||||
sys.stdout.write(stdout)
|
||||
sys.stdout.flush()
|
||||
|
||||
stderr = stderr.strip()
|
||||
if stderr:
|
||||
print >> sys.stderr, stderr.strip(),
|
||||
sys.stderr.write(stderr.strip())
|
||||
sys.stderr.flush()
|
||||
|
||||
sys.exit(extension.returncode)
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue