Working from within cron
This commit is contained in:
@@ -23,7 +23,7 @@ def get_current_weather(api_key, lat, lng, units="IMPERIAL"):
|
||||
return response.json()
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
#print(f"An error occurred: {e}")
|
||||
print(f"Current weather: An error occurred: {e}")
|
||||
return None
|
||||
|
||||
def get_daily_forecast(api_key, lat, lng, days=2):
|
||||
@@ -51,7 +51,7 @@ def get_daily_forecast(api_key, lat, lng, days=2):
|
||||
return data
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
#print(f"An error occurred: {e}")
|
||||
print(f"Forecast: An error occurred: {e}")
|
||||
return None
|
||||
|
||||
def get_google_weather():
|
||||
|
||||
Reference in New Issue
Block a user