mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-28 19:19:23 +00:00
Python 2.7: Check instance on string_types from six instead of str
This commit is contained in:
parent
1b9bb11114
commit
88efa69cfd
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue