Commit d2ed31ac authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

should-vdj-to-tap.py: do not stop at regex errors

parent 4e5cc9f5
Pipeline #66985 passed with stages
in 34 minutes and 54 seconds
......@@ -170,9 +170,9 @@ def should_pattern_to_regex(p):
try:
regex = re.compile(regex_pattern)
except:
except e:
sys.stderr.write("Error. Invalid regex_pattern: " + regex_pattern)
sys.exit(4)
raise e
if args.verbose:
print
......@@ -304,11 +304,14 @@ def write_should_results_to_tap(should_results, f_tap):
ff.write("1..%d\n" % len(should_results))
for tap_id, (should, result) in enumerate(should_results):
tap_line = should_result_to_tap(should, result, tap_id+1)
if tap_line is not None:
if args.verbose or '#!' in tap_line:
print tap_line
ff.write(tap_line + '\n')
try:
tap_line = should_result_to_tap(should, result, tap_id+1)
if tap_line is not None:
if args.verbose or '#!' in tap_line:
print tap_line
ff.write(tap_line + '\n')
except:
sys.stderr.write("! Error in running %s \n" % tap_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment