obi grep: made an error message clearer (error could be eventually be
handled by program, looking for str in bytes returned by a column)
This commit is contained in:
@ -207,9 +207,12 @@ def Filter_generator(options, tax_filter):
|
||||
)
|
||||
|
||||
if good and predicates:
|
||||
try:
|
||||
good = (reduce(lambda bint x, bint y: x and y,
|
||||
(bool(eval(p, loc_env, line))
|
||||
for p in predicates), True))
|
||||
except TypeError:
|
||||
raise Exception("Try replacing strings in python expression with bytes (by putting 'b' in front of strings, e.g. b'example')")
|
||||
|
||||
if good and lmin:
|
||||
good = len(line) >= lmin
|
||||
|
Reference in New Issue
Block a user