Fix python 3.3 compatibility in moto/swf regarging string types detection
This commit is contained in:
parent
c0b4aadd92
commit
3a5f679783
@ -1,4 +1,5 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
import six
|
||||||
|
|
||||||
import boto.swf
|
import boto.swf
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ class SWFBackend(BaseBackend):
|
|||||||
self._check_string(parameter)
|
self._check_string(parameter)
|
||||||
|
|
||||||
def _check_string(self, parameter):
|
def _check_string(self, parameter):
|
||||||
if not isinstance(parameter, basestring):
|
if not isinstance(parameter, six.string_types):
|
||||||
raise SWFSerializationException(parameter)
|
raise SWFSerializationException(parameter)
|
||||||
|
|
||||||
def _check_none_or_list_of_strings(self, parameter):
|
def _check_none_or_list_of_strings(self, parameter):
|
||||||
@ -58,7 +59,7 @@ class SWFBackend(BaseBackend):
|
|||||||
if not isinstance(parameter, list):
|
if not isinstance(parameter, list):
|
||||||
raise SWFSerializationException(parameter)
|
raise SWFSerializationException(parameter)
|
||||||
for i in parameter:
|
for i in parameter:
|
||||||
if not isinstance(i, basestring):
|
if not isinstance(i, six.string_types):
|
||||||
raise SWFSerializationException(parameter)
|
raise SWFSerializationException(parameter)
|
||||||
|
|
||||||
def _process_timeouts(self):
|
def _process_timeouts(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user