fix some pep8 errors

This commit is contained in:
Bastian Schroll 2020-02-24 23:52:20 +01:00
parent e359a0c646
commit 40d7a33a02
No known key found for this signature in database
GPG key ID: 0AE96912A20E9F5F
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