Skip to content

Commit 8755a20

Browse files
Fix crashes in shared.py and plot.py
1 parent 19249f8 commit 8755a20

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

scripts/1-fetch/gcs_fetch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ def query_gcs(args, service, last_completed_plan_index, plan):
259259
initial_delay *= 2 # Exponential backoff
260260
else:
261261
LOGGER.error(f"Error fetching results: {e}")
262+
break
262263
if success:
263264
append_data(args, plan_row, index, count)
264265
else:

scripts/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def annotate_ylabels(ax, data, data_label, colors):
2121
# defaults: ytick.major.size + ytick.major.pad
2222
indent = -1 * (ytick.get_tick_padding() + ytick.get_pad())
2323
for index, row in data.iterrows():
24-
if c > len(colors):
24+
if c >= len(colors):
2525
c = 0
2626

2727
# annotate totals

scripts/shared.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,11 @@ def update_readme(
220220
entry_start_index = lines.index(entry_start_line)
221221
entry_end_index = lines.index(entry_end_line)
222222
# Include any trailing empty/whitespace-only lines
223-
while not lines[entry_end_index + 1].strip():
224-
entry_end_index += 1
223+
while entry_end_index + 1 < len(lines):
224+
if not lines[entry_end_index + 1].strip():
225+
entry_end_index += 1
226+
else:
227+
break
225228
# Initalize variables of entry is not present
226229
else:
227230
entry_start_index = None

0 commit comments

Comments
 (0)