# HG changeset patch # User Jeff Hammel # Date 1604443170 28800 # Node ID e81b431daf377e2b6ccda6baeedea954983e3a9f # Parent 6cb7621072149e418c94a00254b683cf567e2cd9 py3 diff -r 6cb762107214 -r e81b431daf37 bitsyblog/bitsyblog.py --- a/bitsyblog/bitsyblog.py Tue Nov 03 14:16:39 2020 -0800 +++ b/bitsyblog/bitsyblog.py Tue Nov 03 14:39:30 2020 -0800 @@ -27,6 +27,9 @@ from pkg_resources import resource_filename from webob import Request, Response, exc +# python3 (only, for now and probably ever) +string = (str,) + try: # python2 from urlparse import urlparse @@ -67,7 +70,7 @@ # convert kw_value to the proper type _type = type(value) - if isinstance(kw_value, basestring) and not issubclass(_type, basestring) and value is not None: + if isinstance(kw_value, string) and not issubclass(_type, string) and value is not None: if _type == bool: kw_value = kw_value.lower() == 'true' else: