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/cptools.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/cptools.py')
-rw-r--r-- | cherrypy/lib/cptools.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cherrypy/lib/cptools.py b/cherrypy/lib/cptools.py index 073216e0..3221066b 100644 --- a/cherrypy/lib/cptools.py +++ b/cherrypy/lib/cptools.py @@ -7,7 +7,7 @@ from hashlib import md5 import six import cherrypy -from cherrypy._cpcompat import basestring +from cherrypy._cpcompat import text_or_bytes from cherrypy.lib import httputil as _httputil from cherrypy.lib import is_iterator @@ -533,7 +533,7 @@ def accept(media=None, debug=False): """ if not media: return - if isinstance(media, basestring): + if isinstance(media, text_or_bytes): media = [media] request = cherrypy.serving.request |