Check for basestring type in Python2.x, and type str in Python3.x.
parent
144d5f952e
commit
7c3e15d99f
|
@ -484,7 +484,8 @@ def _sanitise(*args):
|
||||||
log.warn("_check_option(): %s" % error.message)
|
log.warn("_check_option(): %s" % error.message)
|
||||||
else:
|
else:
|
||||||
safe_option += (flag + " ")
|
safe_option += (flag + " ")
|
||||||
if isinstance(value, str):
|
if (not _util._py3k and isinstance(value, basestring)) \
|
||||||
|
or (_util._py3k and isinstance(value, str)):
|
||||||
values = value.split(' ')
|
values = value.split(' ')
|
||||||
for v in values:
|
for v in values:
|
||||||
val = _fix_unsafe(v)
|
val = _fix_unsafe(v)
|
||||||
|
|
Loading…
Reference in New Issue