Check for basestring type in Python2.x, and type str in Python3.x.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-21 23:06:57 +00:00
parent 144d5f952e
commit 7c3e15d99f
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 2 additions and 1 deletions

View File

@ -484,7 +484,8 @@ def _sanitise(*args):
log.warn("_check_option(): %s" % error.message)
else:
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(' ')
for v in values:
val = _fix_unsafe(v)