mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Add aliases for StringIO.StringIO
cStringIO doesn't handle unicode, StringIO does. With py2/py3 compatable code we can easily find ourselves getting passed unicode so we don't alias cStringIO Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
d2ee36e350
commit
d331ddf47f
@ -30,6 +30,10 @@ if PY3:
|
||||
integer_types = int,
|
||||
string_types = str
|
||||
text_type = str
|
||||
|
||||
# alias
|
||||
import io
|
||||
StringIO = io.StringIO
|
||||
else:
|
||||
# compat functions
|
||||
from urllib import quote as urllib_quote
|
||||
@ -39,3 +43,7 @@ else:
|
||||
integer_types = (int, long)
|
||||
string_types = basestring
|
||||
text_type = unicode
|
||||
|
||||
# alias
|
||||
import StringIO
|
||||
StringIO = StringIO.StringIO
|
||||
|
Loading…
Reference in New Issue
Block a user