changeset 16:d0ad67182478

py3
author Jeff Hammel <k0scist@gmail.com>
date Tue, 24 Nov 2020 13:14:27 -0800
parents 8e13c2f6c2d7
children cabe97535057
files toolbox/model.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/toolbox/model.py	Tue Nov 24 13:13:36 2020 -0800
+++ b/toolbox/model.py	Tue Nov 24 13:14:27 2020 -0800
@@ -139,7 +139,7 @@
             project[field] = list(set([i.strip() for i in project[field] if i.strip()]))
             index = self.index.setdefault(field, {})
             values = project[field]
-            if isinstance(values, basestring):
+            if isinstance(values, str):
                 values = [values]
             for value in values:
                 index.setdefault(value, set()).update([project['name']])
@@ -161,7 +161,7 @@
             results = self._projects.keys()
         results = set(results)
         for key, values in query.items():
-            if isinstance(values, basestring):
+            if isinstance(values, str):
                 values = [values]
             for value in values:
                 results.intersection_update(self.index.get(key, {}).get(value, set()))