Fix tidiness errors for Python3 compatibility across whole repo

This commit is contained in:
marmeladema 2019-12-10 23:56:12 +00:00
parent 9d04f231f4
commit 7b5fabe855
10 changed files with 51 additions and 41 deletions

View file

@ -627,7 +627,7 @@ install them, let us know by filing a bug!")
def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False, uwp=False, features=None):
"""Return an extended environment dictionary."""
env = os.environ.copy()
if sys.platform == "win32" and type(env['PATH']) == unicode:
if sys.platform == "win32" and type(env['PATH']) == six.text_type:
# On win32, the virtualenv's activate_this.py script sometimes ends up
# turning os.environ['PATH'] into a unicode string. This doesn't work
# for passing env vars in to a process, so we force it back to ascii.