Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Improve expiry logging

Russ Garrett3c6c7811993a
diff --git a/tegola/expire.py b/tegola/expire.py
index eebb292..8da5137 100644
--- a/tegola/expire.py
+++ b/tegola/expire.py
@@ -35,7 +35,12 @@ def expire(tile_list: Path, tegola_config: str, dry_run: bool):
log.info("Would run: %s", " ".join(cmd))
return
- subprocess.run(cmd)
+ result = subprocess.run(cmd, capture_output=True)
+ if result.returncode != 0:
+ log.error("Failed to expire tile list (%s): %s", tile_list, result.stderr)
+ return
+
+ log.info("Expired tile list %s", tile_list)
os.remove(tile_list)