Make code more pep8 compliant
This commit is contained in:
parent
c576888da5
commit
c2ed73bafc
|
@ -21,7 +21,7 @@ class MastodonBot(Bot):
|
||||||
try:
|
try:
|
||||||
m = Mastodon(*user.get_masto_credentials())
|
m = Mastodon(*user.get_masto_credentials())
|
||||||
except TypeError:
|
except TypeError:
|
||||||
#logger.error("No Mastodon Credentials in database.", exc_info=True)
|
# logger.error("No Mastodon Credentials in database.", exc_info=True)
|
||||||
return mentions
|
return mentions
|
||||||
try:
|
try:
|
||||||
notifications = m.notifications()
|
notifications = m.notifications()
|
||||||
|
@ -71,4 +71,5 @@ class MastodonBot(Bot):
|
||||||
try:
|
try:
|
||||||
m.toot(text)
|
m.toot(text)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error('Error tooting: ' + user.get_city() + ': ' + report.id, exc_info=True)
|
logger.error('Error tooting: ' + user.get_city() + ': ' +
|
||||||
|
report.id, exc_info=True)
|
||||||
|
|
|
@ -34,7 +34,8 @@ class TelegramBot(Bot):
|
||||||
# TODO: /help message should be set in frontend
|
# TODO: /help message should be set in frontend
|
||||||
else:
|
else:
|
||||||
reports.append(Report(update.message.sender.username, self,
|
reports.append(Report(update.message.sender.username, self,
|
||||||
update.message.text, None, update.message.date))
|
update.message.text, None,
|
||||||
|
update.message.date))
|
||||||
return reports
|
return reports
|
||||||
|
|
||||||
def post(self, user, report):
|
def post(self, user, report):
|
||||||
|
|
|
@ -123,7 +123,7 @@ def unsubscribe(token):
|
||||||
user = db.by_city(city)
|
user = db.by_city(city)
|
||||||
user.remove_subscriber(email)
|
user.remove_subscriber(email)
|
||||||
return city_page(city, info="You successfully unsubscribed " + email +
|
return city_page(city, info="You successfully unsubscribed " + email +
|
||||||
" from the mail notifications.")
|
" from the mail notifications.")
|
||||||
|
|
||||||
|
|
||||||
@get('/settings')
|
@get('/settings')
|
||||||
|
@ -145,6 +145,7 @@ def update_mail_md(user):
|
||||||
user.set_mail_md(request.forms['mail_md'])
|
user.set_mail_md(request.forms['mail_md'])
|
||||||
return user.state()
|
return user.state()
|
||||||
|
|
||||||
|
|
||||||
@post('/settings/goodlist')
|
@post('/settings/goodlist')
|
||||||
@view('template/settings.tpl')
|
@view('template/settings.tpl')
|
||||||
def update_trigger_patterns(user):
|
def update_trigger_patterns(user):
|
||||||
|
|
Loading…
Reference in a new issue