Fix prepare getch for macOS.

This commit is contained in:
John Preston 2021-09-13 16:50:44 +03:00
parent e99f650eaa
commit 3202a5f081
1 changed files with 6 additions and 6 deletions

View File

@ -297,7 +297,7 @@ class _GetchWindows:
def __call__(self):
import msvcrt
return msvcrt.getch()
return msvcrt.getch().decode('ascii')
getch = _Getch()
@ -342,16 +342,16 @@ def runStages():
else:
print('(r)ebuild, rebuild (a)ll, (s)kip, (q)uit?: ', end='', flush=True)
while True:
ch = b'r' if rebuildStale else getch()
if ch == b'q':
ch = 'r' if rebuildStale else getch()
if ch == 'q':
finish(0)
elif ch == b's':
elif ch == 's':
checkResult = 'Skip'
break
elif ch == b'r':
elif ch == 'r':
checkResult = 'Rebuild'
break
elif ch == b'a':
elif ch == 'a':
checkResult = 'Rebuild'
rebuildStale = True
break