aboutsummaryrefslogtreecommitdiffstats
path: root/fnme/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'fnme/cli.py')
-rw-r--r--fnme/cli.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/fnme/cli.py b/fnme/cli.py
index 7c0d49d..22d1a86 100644
--- a/fnme/cli.py
+++ b/fnme/cli.py
@@ -6,6 +6,7 @@ from tabulate import tabulate
from fnme.constants import SORT_KV
from fnme.data import get_latest_data
+from fnme.exceptions import LocationError
from fnme.geo import get_location
from fnme.station import process_stations, sort_stations
@@ -54,9 +55,15 @@ def main():
try:
location = get_location(args.address)
- except ValueError as e:
- print(f"[*] {e}")
+ print(f"[✔] Coordinates found: {args.address}")
+ except LocationError as e:
+ print(f"Error: {e.message}")
+ print("Check the spelling of the address or try a different address.")
sys.exit(1)
+ except Exception as e:
+ print(f"An unexpected error occurred: {e}")
+ sys.exit(1)
+
df, last_modified = get_latest_data()
print(f"Last updated: {last_modified}")
git.ajschof.me — hosted by ajschofield — powered by cgit