Skip to content

Commit

Permalink
Fix output of "Invalid warning code encountered" errors in preprocess…
Browse files Browse the repository at this point in the history
… script.
  • Loading branch information
marcus1487 committed Sep 30, 2019
1 parent 32fdd61 commit 87e3be1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tombo/_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def update_warn(warn_val):
'basecalls.', file=sys.stderr)
been_warned[_WARN_OVRWRT_VAL] = True
else:
if VERBOSE: bar.write(
_WARN_PREFIX + 'Invalid warning code encountered.',
file=sys.stderr)
if VERBOSE:
bar.write('{}Invalid warning code encountered: {}'.format(
_WARN_PREFIX, warn_val), file=sys.stderr)

return

Expand Down Expand Up @@ -325,8 +325,8 @@ def _get_prep_queue(read_ids_q, prog_q, warn_q, gp_conn, num_fast5s):
bar.write(ovrwrt_mess, file=sys.stderr)
been_warned[_WARN_OVRWRT_VAL] = True
else:
bar.write(_WARN_PREFIX + 'Invalid warning code encountered.',
file=sys.stderr)
bar.write('{}Invalid warning code encountered: {}'.format(
_WARN_PREFIX, warn_val), file=sys.stderr)
except queue.Empty:
try:
if VERBOSE: bar.update(prog_q.get(block=False))
Expand All @@ -345,9 +345,9 @@ def _get_prep_queue(read_ids_q, prog_q, warn_q, gp_conn, num_fast5s):
if VERBOSE and not been_warned[_WARN_OVRWRT_VAL]:
bar.write(ovrwrt_mess, file=sys.stderr)
been_warned[_WARN_OVRWRT_VAL] = True
else:
bar.write(_WARN_PREFIX + 'Invalid warning code encountered.',
file=sys.stderr)
else:
bar.write('{}Invalid warning code encountered: {}'.format(
_WARN_PREFIX, warn_val), file=sys.stderr)
while not prog_q.empty():
if VERBOSE: bar.update(prog_q.get(block=False))

Expand Down

0 comments on commit 87e3be1

Please sign in to comment.