Skip to content

Commit

Permalink
Minor: Move variables used in error message into scope
Browse files Browse the repository at this point in the history
  • Loading branch information
physikerwelt committed Sep 2, 2021
1 parent 3aed092 commit e420357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/update_zblinks_api/update_with_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,16 @@ def use_files_to_update():
except FileNotFoundError:
click.echo(f"Error: could not find {insert_file}.")

edit_file = f"results/{partner}_to_edit.csv"
try:
edit_file = f"results/{partner}_to_edit.csv"
df_edit = pd.read_csv(edit_file)
for _, row in df_edit.iterrows():
update_request(row, partner)
except FileNotFoundError:
click.echo(f"Error: could not find {edit_file}.")

delete_file = f"results/{partner}_delete_links.csv"
try:
delete_file = f"results/{partner}_delete_links.csv"
df_delete = pd.read_csv(delete_file)
for _, row in df_delete.iterrows():
delete_request(row, partner)
Expand Down

0 comments on commit e420357

Please sign in to comment.