Skip to content

Commit

Permalink
Fix shapefiles.py error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pdil committed Dec 28, 2024
1 parent a517ebd commit 8d134b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-map-data.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

name: build-map-data
run-name: Add ${{ inputs.year }} map data
run-name: Add ${{ inputs.year || 'latest' }} map data

on:
schedule:
Expand Down
4 changes: 2 additions & 2 deletions data-raw/scripts/shapefiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def _download_and_extract(file_url: str, extract_dir: str) -> bool:
def _failed(code: int):
if (gh_env := os.getenv("GITHUB_OUTPUT")):
with open(gh_env, "a") as f:
f.write(f"exit_code={e.code}")
f.write(f"exit_code={code}")

sys.exit(e.code)
sys.exit(code)

def download_shapefiles(selected_year=None):
"""
Expand Down

0 comments on commit 8d134b8

Please sign in to comment.