grep: now prints the number of entries grepped

This commit is contained in:
Celine Mercier
2020-07-13 17:08:13 +02:00
parent 9672f01c6a
commit 8dd403a118

View File

@ -335,14 +335,14 @@ def run(config):
for i in range(len(i_view)):
PyErr_CheckSignals()
pb(i)
selection.append(i)
selection.append(i)
elif filter is not None : # filter is None if no line will be selected because some columns don't exist
for i in range(len(i_view)):
PyErr_CheckSignals()
pb(i)
line = i_view[i]
loc_env = {"sequence": line, "line": line, "taxonomy": taxo, "obi_eval_result": False}
good = filter(line, loc_env)
@ -358,7 +358,9 @@ def run(config):
o_view = selection.materialize(o_view_name)
except Exception, e:
raise RollbackException("obi grep error, rollbacking view: "+str(e), o_view)
logger("info", "Grepped %d entries" % len(o_view))
# Save command config in View and DMS comments
command_line = " ".join(sys.argv[1:])
input_dms_name=[input[0].name]