From d4946bf714e4053f33209c0fd68287f4b01f6400 Mon Sep 17 00:00:00 2001 From: PeterLaemmle Date: Sat, 30 Sep 2017 18:11:20 +0200 Subject: [PATCH 1/2] Update Telegram.py Import libraries urllib and googlemaps only if RICforLocationAPIKey is defined. --- plugins/Telegram/Telegram.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Telegram/Telegram.py b/plugins/Telegram/Telegram.py index fc4acc78..dc4cc6e2 100644 --- a/plugins/Telegram/Telegram.py +++ b/plugins/Telegram/Telegram.py @@ -11,9 +11,11 @@ # 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 From 47bdff4b28292a6c0ff3009cc3fbab195037d59f Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Sat, 30 Sep 2017 18:27:11 +0200 Subject: [PATCH 2/2] edit CL --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 609abc48..15ca61eb 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