diff --git a/CHANGELOG.md b/CHANGELOG.md index 609abc4..15ca61e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### __[v2.2.2]__ - unreleased ##### Added ##### Changed +- Telegram Plugin importiert Google Maps Funktionen nur noch wenn API Key eingetragen ist [#315](https://github.com/Schrolli91/BOSWatch/pull/315) ##### Deprecated ##### Removed ##### Fixed diff --git a/plugins/Telegram/Telegram.py b/plugins/Telegram/Telegram.py index fc4acc7..dc4cc6e 100644 --- a/plugins/Telegram/Telegram.py +++ b/plugins/Telegram/Telegram.py @@ -11,9 +11,11 @@ Plugin to send FMS-, ZVEI- and POCSAG-messages via Telegram # Imports # import logging # Global logger -import urllib, telegram, googlemaps +import telegram from telegram.error import (TelegramError, Unauthorized, BadRequest, NetworkError) from includes import globalVars # Global variables +if globalVars.config.get("Telegram","RICforLocationAPIKey"): + import urllib, googlemaps # Helper function, uncomment to use from includes.helper import wildcardHandler