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: try:
SetGlobalVariables() SetGlobalVariables()
if sys.version_info[1] >= 7: if sys.version_info[1] >= 7:
try:
sys.stdout.reconfigure(encoding=GC_Values[GC_CHARSET], sys.stdout.reconfigure(encoding=GC_Values[GC_CHARSET],
errors='backslashreplace') errors='backslashreplace')
sys.stdin.reconfigure(encoding=GC_Values[GC_CHARSET], sys.stdin.reconfigure(encoding=GC_Values[GC_CHARSET],
errors='backslashreplace') errors='backslashreplace')
except AttributeError:
pass
command = sys.argv[1].lower() command = sys.argv[1].lower()
if command == 'batch': if command == 'batch':
i = 2 i = 2