diff options
Diffstat (limited to 'menuconfig.py')
| -rwxr-xr-x | menuconfig.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/menuconfig.py b/menuconfig.py index 8ae0cc8..2360541 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -185,12 +185,15 @@ See the https://github.com/zephyrproject-rtos/windows-curses repository. """ from __future__ import print_function +import os import sys +_IS_WINDOWS = os.name == "nt" # Are we running on Windows? + try: import curses except ImportError as e: - if sys.platform != "win32": + if not _IS_WINDOWS: raise sys.exit("""\ menuconfig failed to import the standard Python 'curses' library. Try @@ -209,7 +212,6 @@ Exception: import errno import locale -import os import re import textwrap @@ -3278,8 +3280,5 @@ def _change_c_lc_ctype_to_utf8(): return -# Are we running on Windows? -_IS_WINDOWS = os.name == "nt" - if __name__ == "__main__": _main() |
