Skip to content

Commit

Permalink
Better syntax for fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyen-v committed Nov 13, 2024
1 parent e77af01 commit 11fb946
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kibot/pre_include_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,10 @@ def update_table(ops, parent):
index = int(group_suffix[-2])-1
group_suffix = group_suffix[:-3]
logger.debug(f' - {group_suffix} index: {index}')
res = out_to_csv_mapping.get(group_suffix)
if res is None:
out, csv = out_to_csv_mapping.get(group_suffix, (None, None))
if not csv:
logger.warning(W_NOMATCHGRP+f'No output to handle `{group_name}` found')
continue
else:
out, csv = res
if index < 0 or index >= len(csv):
msg = f'index {index+1} is out of range, '+('only one CSV available' if len(csv) == 1 else
f'must be in the [1,{len(csv)}] range')
Expand Down

0 comments on commit 11fb946

Please sign in to comment.