Skip to content

Commit

Permalink
Add filename to search_file() runtime error
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Jul 30, 2024
1 parent ba74dce commit 04c851d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc_scripts/update_workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def search_file(search_key, old_verstring, new_verstring, filename):
if search_key in line:
templine = line.replace(old_verstring, new_verstring)
if new_verstring not in templine:
raise RuntimeError(f'Old version "{old_verstring}" not in file')
raise RuntimeError(
f'Old version "{old_verstring}" not in "{line} in file "{filename}"'
)
output.append(templine)
else:
output.append(line)
Expand Down

0 comments on commit 04c851d

Please sign in to comment.