Merge branch 'bugfix/menuconfig_py3' into 'master'
tools: Fix menuconfig for Python 3 See merge request espressif/esp-idf!6991
This commit is contained in:
commit
8b219c0884
1 changed files with 5 additions and 3 deletions
|
@ -35,9 +35,11 @@ def action_extensions(base_actions, project_path):
|
|||
Menuconfig target is build_target extended with the style argument for setting the value for the environment
|
||||
variable.
|
||||
"""
|
||||
# The subprocess lib cannot accept environment variables as "unicode" . This is a problem
|
||||
# only in Python 2.
|
||||
os.environ['MENUCONFIG_STYLE'] = style.encode(sys.getfilesystemencoding() or 'utf-8')
|
||||
if sys.version_info[0] < 3:
|
||||
# The subprocess lib cannot accept environment variables as "unicode".
|
||||
# This encoding step is required only in Python 2.
|
||||
style = style.encode(sys.getfilesystemencoding() or 'utf-8')
|
||||
os.environ['MENUCONFIG_STYLE'] = style
|
||||
build_target(target_name, ctx, args)
|
||||
|
||||
def fallback_target(target_name, ctx, args):
|
||||
|
|
Loading…
Reference in a new issue