issue #426: TemporaryEnvironment must coerce to Unicode.

This commit is contained in:
David Wilson 2019-01-19 01:51:54 +00:00
parent 4bc0d0ec13
commit ca9ae4590c
1 changed files with 2 additions and 0 deletions

View File

@ -454,6 +454,8 @@ class TemporaryEnvironment(object):
self.original = dict(os.environ)
self.env = env or {}
for key, value in iteritems(self.env):
key = mitogen.core.to_text(key)
value = mitogen.core.to_text(value)
if value is None:
os.environ.pop(key, None)
else: