Skip to content

Commit 24827cc

Browse files
author
Richard Strnad
committed
Made print Python3 compatible
1 parent 35c6c38 commit 24827cc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

acitoolkit/aciSearch.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,18 @@ def _define_searchables(self):
166166
atk_attrs = self.get_attributes()
167167
for atk_attr in atk_attrs:
168168
if atk_attrs[atk_attr] is not None:
169-
if not isinstance(atk_attrs[atk_attr], str) and not isinstance(atk_attrs[atk_attr], bool):
169+
if isinstance(atk_attrs[atk_attr], list):
170+
attr_list = atk_attrs[atk_attr]
171+
for attr in attr_list:
172+
if isinstance(atk_attrs[atk_attr], str) or isinstance(atk_attrs[atk_attr], bool):
173+
result.add_term(atk_attr, str(attr))
174+
print(atk_attr, str(attr))
175+
else:
176+
print("wrong type %s" % str(atk_attr))
177+
elif not isinstance(atk_attrs[atk_attr], str) and not isinstance(atk_attrs[atk_attr], bool):
170178
print("wrong type %s" % str(atk_attr))
171-
result.add_term(atk_attr, str(atk_attrs[atk_attr]))
179+
else:
180+
result.add_term(atk_attr, str(atk_attrs[atk_attr]))
172181
return [result]
173182

174183
@staticmethod

0 commit comments

Comments
 (0)