From 34751c38b0a2f6dfb83daed334d9fdfa3d22cc52 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 4 Jul 2018 23:28:25 +0000 Subject: [PATCH] ansible: cStringIO interprets unicode as a buffer obj on 2.x --- 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 5cd1f032..37f3b788 100644 --- a/ansible_mitogen/runner.py +++ b/ansible_mitogen/runner.py @@ -52,7 +52,8 @@ import mitogen.core import ansible_mitogen.target # TODO: circular import try: - from cStringIO import StringIO + # Cannot use cStringIO as it does not support Unicode. + from StringIO import StringIO except ImportError: from io import StringIO