From 27223b12534b2fe8a254de90ceca5dc3d8a54517 Mon Sep 17 00:00:00 2001 From: Marcus Cobden Date: Mon, 11 Aug 2014 08:48:37 +0100 Subject: [PATCH] Switch cStringIO to StringIO for unicode support The performance difference isn't too bad --- lib/ansible/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index cd6c2e98b84..213174af4a8 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -33,7 +33,7 @@ from ansible.module_utils.splitter import split_args, unquote import ansible.constants as C import ast import time -import cStringIO +import StringIO import stat import termios import tty @@ -366,7 +366,7 @@ def _clean_data(orig_data, from_remote=False, from_inventory=False): regex = PRINT_CODE_REGEX if replace_prints else CODE_REGEX - with contextlib.closing(cStringIO.StringIO()) as data: + with contextlib.closing(StringIO.StringIO()) as data: # these variables keep track of opening block locations, as we only # want to replace matched pairs of print/block tags last_pos = 0