Skip to content

Commit 1c5730a

Browse files
committed
actually handle %, fix spacing bug
1 parent 4c11cf5 commit 1c5730a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dSQAutopsy.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def collapse_ranges(i):
2828
def expand_ranges(idx_range):
2929
if "[" in idx_range:
3030
start = idx_range.find('[')+1
31-
end = a.find(']') if a.find('%') == -1 else a.find('%')
31+
end = idx_range.find(']') if idx_range.find('%') == -1 else idx_range.find('%')
3232
for sub_idx in idx_range[start:end].split(","):
3333
if "-" not in sub_idx:
3434
yield int(sub_idx)
@@ -83,13 +83,12 @@ def get_state_status(jid, rerun_states):
8383

8484
for state in array_states:
8585
array_states[state] = ",".join(collapse_ranges(sorted(array_states[state])))
86-
if len(array_states[state])+2 > column_lengths["State"]:
86+
if len(array_states[state])+2 > column_lengths["Indices"]:
8787
# track column widths for pretty printing
88-
column_lengths["State"] = len(array_states[state])+2
88+
column_lengths["Indices"] = len(array_states[state])+2
8989

9090
print("State Summary for Array {}".format(job_id), file=sys.stderr)
9191
summary_template = "{{:<{}}}{{:^{}}}{{:<{}}}".format(*[column_lengths[x] for x in state_summary_header])
92-
9392
print(summary_template.format(*state_summary_header), file=sys.stderr)
9493
print(summary_template.format(*["-" * len(x) for x in state_summary_header]), file=sys.stderr)
9594
for state in sorted(state_summary, key=state_summary.get, reverse=True):

0 commit comments

Comments
 (0)