NVDA with Japanese branch
修订版 | a845561a963c0346938c32976c541a005e17fb6e (tree) |
---|---|
时间 | 2018-09-21 18:50:45 |
作者 | Takuya Nishimoto <nishimotz@gmai...> |
Commiter | Takuya Nishimoto |
nvdajp/nvdajp#106 [skip ci]
@@ -74,7 +74,10 @@ globalVars.startTime=time.time() | ||
74 | 74 | # Check OS version requirements |
75 | 75 | import winVersion |
76 | 76 | if not winVersion.isSupportedOS(): |
77 | - winUser.MessageBox(0, ctypes.FormatError(winUser.ERROR_OLD_WIN_VERSION).decode('mbcs'), None, winUser.MB_ICONERROR) | |
77 | + msg = ctypes.FormatError(winUser.ERROR_OLD_WIN_VERSION) | |
78 | + if hasattr(msg, 'decode'): | |
79 | + msg = msg.decode('mbcs') | |
80 | + winUser.MessageBox(0, msg, None, winUser.MB_ICONERROR) | |
78 | 81 | sys.exit(1) |
79 | 82 | |
80 | 83 | def decodeMbcs(string): |