From f274d258227ff8fc23ffdd6cee65f13a0ada1d33 Mon Sep 17 00:00:00 2001 From: b3yond Date: Tue, 6 Nov 2018 08:56:24 +0100 Subject: [PATCH] updated example config options + 1 little fix --- active_bots/telegrambot.py | 2 +- config.toml.example | 5 +---- sendmail.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/active_bots/telegrambot.py b/active_bots/telegrambot.py index 385c32d..1c3eae9 100644 --- a/active_bots/telegrambot.py +++ b/active_bots/telegrambot.py @@ -23,7 +23,7 @@ class TelegramBot(Bot): # return when telegram returns an error code if update in [303, 404, 420, 500, 502]: return reports - elif isinstance(update, int): + if isinstance(update, int): logger.error("Unknown Telegram error code: " + str(update)) return reports user.save_seen_tg(update.update_id) diff --git a/config.toml.example b/config.toml.example index d93c333..eb519db 100644 --- a/config.toml.example +++ b/config.toml.example @@ -10,10 +10,7 @@ port = 80 contact = "b3yond@riseup.net" [mail] -mailserver = "smtp.riseup.net" -user = "user" -passphrase = "sup3rs3cur3" -mbox = "root" +mbox_user = "root" [database] db_path = "/var/ticketfrei/db.sqlite" diff --git a/sendmail.py b/sendmail.py index dec722d..3c6e9a6 100755 --- a/sendmail.py +++ b/sendmail.py @@ -27,5 +27,5 @@ def sendmail(to, subject, city=None, body=''): # For testing: if __name__ == '__main__': - sendmail(config['mail']['contact'], "Test Mail", + sendmail(config['web']['contact'], "Test Mail", body="This is a test mail.")