Handle issue #1277 (#1312)

This commit is contained in:
Ross Scroggs
2021-01-28 09:10:56 -08:00
committed by GitHub
parent 4f99eb6f07
commit 141aca9e25

View File

@@ -10979,10 +10979,13 @@ def ProcessGAMCommand(args):
try:
SetGlobalVariables()
if sys.version_info[1] >= 7:
sys.stdout.reconfigure(encoding=GC_Values[GC_CHARSET],
errors='backslashreplace')
sys.stdin.reconfigure(encoding=GC_Values[GC_CHARSET],
errors='backslashreplace')
try:
sys.stdout.reconfigure(encoding=GC_Values[GC_CHARSET],
errors='backslashreplace')
sys.stdin.reconfigure(encoding=GC_Values[GC_CHARSET],
errors='backslashreplace')
except AttributeError:
pass
command = sys.argv[1].lower()
if command == 'batch':
i = 2