From 3a5f679783f3b176017a13981779be2ce2fd19e9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Barth Date: Tue, 3 Nov 2015 10:41:23 +0100 Subject: [PATCH] Fix python 3.3 compatibility in moto/swf regarging string types detection --- moto/swf/models/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moto/swf/models/__init__.py b/moto/swf/models/__init__.py index 18db47e24..8702bc374 100644 --- a/moto/swf/models/__init__.py +++ b/moto/swf/models/__init__.py @@ -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):