Skip to content

Commit 88efa69

Browse files
author
Konrad Cempura
committed
Python 2.7: Check instance on string_types from six instead of str
1 parent 1b9bb11 commit 88efa69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openapi_core/schema/schemas/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""OpenAPI core schemas util module"""
22
from distutils.util import strtobool
3+
from six import string_types
34

45

56
def forcebool(val):
6-
if isinstance(val, str):
7+
if isinstance(val, string_types):
78
val = strtobool(val)
89

910
return bool(val)

0 commit comments

Comments
 (0)