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): ...@@ -170,9 +170,9 @@ def should_pattern_to_regex(p):
try: try:
regex = re.compile(regex_pattern) regex = re.compile(regex_pattern)
except: except e:
sys.stderr.write("Error. Invalid regex_pattern: " + regex_pattern) sys.stderr.write("Error. Invalid regex_pattern: " + regex_pattern)
sys.exit(4) raise e
if args.verbose: if args.verbose:
print print
...@@ -304,11 +304,14 @@ def write_should_results_to_tap(should_results, f_tap): ...@@ -304,11 +304,14 @@ def write_should_results_to_tap(should_results, f_tap):
ff.write("1..%d\n" % len(should_results)) ff.write("1..%d\n" % len(should_results))
for tap_id, (should, result) in enumerate(should_results): for tap_id, (should, result) in enumerate(should_results):
tap_line = should_result_to_tap(should, result, tap_id+1) try:
if tap_line is not None: tap_line = should_result_to_tap(should, result, tap_id+1)
if args.verbose or '#!' in tap_line: if tap_line is not None:
print tap_line if args.verbose or '#!' in tap_line:
ff.write(tap_line + '\n') 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