From bba5d82fc4b4ef8d2e05cd3c214f72733b0316f4 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Jan 2019 12:44:08 +0000 Subject: [PATCH] issue #477: fix another str/bytes mixup. --- ansible_mitogen/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible_mitogen/runner.py b/ansible_mitogen/runner.py index 0453a11a..5e85eb71 100644 --- a/ansible_mitogen/runner.py +++ b/ansible_mitogen/runner.py @@ -50,6 +50,7 @@ from mitogen.core import b from mitogen.core import bytes_partition from mitogen.core import str_partition from mitogen.core import str_rpartition +from mitogen.core import to_text try: import ctypes @@ -455,7 +456,7 @@ class ModuleUtilsImporter(object): mod.__path__ = [] mod.__package__ = str(fullname) else: - mod.__package__ = str(str_rpartition(fullname, '.')[0]) + mod.__package__ = str(str_rpartition(to_text(fullname), '.')[0]) exec(code, mod.__dict__) self._loaded.add(fullname) return mod