Merge branch 'develop' into docs_fixes

This commit is contained in:
Bastian Schroll 2020-02-24 23:54:06 +01:00 committed by GitHub
commit 543f1d3ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -45,13 +45,13 @@ class BoswatchPlugin(PluginBase):
if bwPacket.get("lat") is not None and bwPacket.get("lon") is not None:
logging.debug("Found coordinates in packet")
(lat, lon) = (bwPacket.get("lat"), bwPacket.get("lon"))
for chatId in self.config.get("chatIds", default=[]):
try:
# Send Message via Telegram
logging.info("Sending message to " + chatId)
self.bot.send_message(chat_id=chatId, text=msg)
# Send Location via Telegram if lat and lon are defined
if lat is not None and lon is not None:
logging.info("Sending location to " + chatId)

3
pytest.sh Normal file
View file

@ -0,0 +1,3 @@
source ./venv/bin/activate
pytest -c test/pytest.ini
deactivate