python/compat: use cStringIO instead of StringIO in compat.py
authorNoel Power <noel.power@suse.com>
Fri, 10 Aug 2018 18:54:46 +0000 (19:54 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 3 Sep 2018 01:22:21 +0000 (03:22 +0200)
Using cStringIO for py2 seems to incur alot less problems and less changes
to the py2/py3 code then using StringIO.StringIO

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/compat.py

index aa1ac29..e328cc5 100644 (file)
@@ -92,6 +92,6 @@ else:
     binary_type = str
 
     # alias
-    import StringIO
-    StringIO = StringIO.StringIO
+    import cStringIO
+    StringIO = cStringIO.StringIO
     cmp_fn = cmp