Skip to content

Commit 27ab9c2

Browse files
committed
Merge pull request #1238 from DariusMR/master
unicode type forgotten in api_client.mustache for python
2 parents 8978a0a + 65f86db commit 27ab9c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/swagger-codegen/src/main/resources/python/api_client.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,12 @@ class ApiClient(object):
187187
:param obj: The data to serialize.
188188
:return: The serialized form of data.
189189
"""
190+
types = (str, int, float, bool, tuple)
191+
if sys.version_info < (3,0):
192+
types = types + (unicode,)
190193
if isinstance(obj, type(None)):
191194
return None
192-
elif isinstance(obj, (str, int, float, bool, tuple)):
195+
elif isinstance(obj, types):
193196
return obj
194197
elif isinstance(obj, list):
195198
return [self.sanitize_for_serialization(sub_obj)

0 commit comments

Comments
 (0)