Fix python 3.3 compatibility in moto/swf regarging string types detection

This commit is contained in:
Jean-Baptiste Barth 2015-11-03 10:41:23 +01:00
parent c0b4aadd92
commit 3a5f679783

View File

@ -1,4 +1,5 @@
from __future__ import unicode_literals
import six
import boto.swf
@ -47,7 +48,7 @@ class SWFBackend(BaseBackend):
self._check_string(parameter)
def _check_string(self, parameter):
if not isinstance(parameter, basestring):
if not isinstance(parameter, six.string_types):
raise SWFSerializationException(parameter)
def _check_none_or_list_of_strings(self, parameter):
@ -58,7 +59,7 @@ class SWFBackend(BaseBackend):
if not isinstance(parameter, list):
raise SWFSerializationException(parameter)
for i in parameter:
if not isinstance(i, basestring):
if not isinstance(i, six.string_types):
raise SWFSerializationException(parameter)
def _process_timeouts(self):