diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-07-24 15:23:17 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-07-24 15:23:17 -0400 |
commit | d3c9807ba42c9b60fa077257e008caae42c3aeb0 (patch) | |
tree | c66ccc9942773417883db9aac86d2e4d83e061e2 /cherrypy/lib/jsontools.py | |
parent | 5786a6393617be02a795b040bf02509cab71ce76 (diff) | |
download | cherrypy-git-d3c9807ba42c9b60fa077257e008caae42c3aeb0.tar.gz |
Use the preferred name text_or_bytes to avoid conflation with 'basestring' which has no equivalent on Python 3.
Diffstat (limited to 'cherrypy/lib/jsontools.py')
-rw-r--r-- | cherrypy/lib/jsontools.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cherrypy/lib/jsontools.py b/cherrypy/lib/jsontools.py index 90b3ff8a..79ceaa48 100644 --- a/cherrypy/lib/jsontools.py +++ b/cherrypy/lib/jsontools.py @@ -1,5 +1,5 @@ import cherrypy -from cherrypy._cpcompat import basestring, ntou, json_encode, json_decode +from cherrypy._cpcompat import text_or_bytes, ntou, json_encode, json_decode def json_processor(entity): @@ -41,7 +41,7 @@ def json_in(content_type=[ntou('application/json'), ntou('text/javascript')], package importable; otherwise, ValueError is raised during processing. """ request = cherrypy.serving.request - if isinstance(content_type, basestring): + if isinstance(content_type, text_or_bytes): content_type = [content_type] if force: |