aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2026-04-27 21:19:45 +0100
committerAlex Schofield <git@ajschof.me>2026-04-27 21:19:45 +0100
commit60dbfd6f4b8d715dede8b1114ae96b51cd90bd0f (patch)
tree9b9650f41e6f0b2b9e604e3d136fe4d2a4960b9c /main.py
parent7bf88ef767d0bb91597471bc642725b98187d4a2 (diff)
downloadfuelnearme-60dbfd6f4b8d715dede8b1114ae96b51cd90bd0f.tar.gz
fuelnearme-60dbfd6f4b8d715dede8b1114ae96b51cd90bd0f.zip
return and exit in output_stations() if no stations found in radius
Diffstat (limited to 'main.py')
-rw-r--r--main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py
index 9b8ea36..d1542c8 100644
--- a/main.py
+++ b/main.py
@@ -83,6 +83,9 @@ def sort_stations(stations: list[dict], sort: str) -> list[dict]:
def output_stations(stations: List[Dict[str, Any]]) -> None:
+ if not stations:
+ print("[*] No stations found.")
+ return
print(
tabulate(
stations,
git.ajschof.me — hosted by ajschofield — powered by cgit