From 88efa69cfd5171f2379de257e6885108d60e5ce5 Mon Sep 17 00:00:00 2001 From: Konrad Cempura Date: Sun, 15 Jul 2018 23:21:15 +0200 Subject: [PATCH] Python 2.7: Check instance on string_types from six instead of str --- openapi_core/schema/schemas/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openapi_core/schema/schemas/util.py b/openapi_core/schema/schemas/util.py index cf2c917..4a87f46 100644 --- a/openapi_core/schema/schemas/util.py +++ b/openapi_core/schema/schemas/util.py @@ -1,9 +1,10 @@ """OpenAPI core schemas util module""" from distutils.util import strtobool +from six import string_types def forcebool(val): - if isinstance(val, str): + if isinstance(val, string_types): val = strtobool(val) return bool(val)