From ca9ae4590c4f2e28dace080a04daa9029fca9d11 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 19 Jan 2019 01:51:54 +0000 Subject: [PATCH] issue #426: TemporaryEnvironment must coerce to Unicode. --- ansible_mitogen/runner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible_mitogen/runner.py b/ansible_mitogen/runner.py index 46539041..9089025d 100644 --- a/ansible_mitogen/runner.py +++ b/ansible_mitogen/runner.py @@ -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: