druid: use six.string_types instead of basestring (#2541)

Which is not available in python3

Fix #2539
This commit is contained in:
Riccardo Magliocchetti 2017-04-03 17:25:08 +02:00 committed by Maxime Beauchemin
parent 243eeadfd6
commit 0c0666caa0

View File

@ -982,10 +982,10 @@ class DruidDatasource(Model, BaseDatasource):
if op in ('in', 'not in'): if op in ('in', 'not in'):
eq = [ eq = [
types.replace("'", '').strip() types.replace("'", '').strip()
if isinstance(types, basestring) if isinstance(types, string_types)
else types else types
for types in eq] for types in eq]
elif not isinstance(flt['val'], basestring): elif not isinstance(flt['val'], string_types):
eq = eq[0] if len(eq) > 0 else '' eq = eq[0] if len(eq) > 0 else ''
if col in self.num_cols: if col in self.num_cols:
if op in ('in', 'not in'): if op in ('in', 'not in'):