From 2590d36f69ef55ce13f1699583a88f30969b172e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 11 Nov 2024 22:08:48 -0800 Subject: refactor: move target cities variable into immediate use --- ami.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ami.py b/ami.py index 3d510dd..334abbc 100644 --- a/ami.py +++ b/ami.py @@ -19,8 +19,6 @@ location = geolocator.geocode(environ.get("LOCATION"), addressdetails=True) client.inject_token(environ.get("AUTHORIZATION"), "authorization") -target_cities = environ.get("TARGET_CITIES") or "" - def log_response(data): log = environ.get("LOG") @@ -195,7 +193,7 @@ def print_job_table(): ) for job in json_api_data["data"]["searchJobCardsByLocation"]["jobCards"]: - for city in target_cities.split(","): + for city in (environ.get("TARGET_CITIES") or "").split(","): fixed_city = city.strip() if job["city"].lower() == fixed_city.lower(): -- cgit v1.2.3