changeset 118:e81b431daf37

py3
author Jeff Hammel <k0scist@gmail.com>
date Tue, 03 Nov 2020 14:39:30 -0800
parents 6cb762107214
children ff44e92fe93f
files bitsyblog/bitsyblog.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: