From 86a1b8b625a06e05abf4907d600f8986291309e3 Mon Sep 17 00:00:00 2001 From: Ethan Nelson Date: Sat, 17 Dec 2016 14:04:39 -0600 Subject: [PATCH] Fix crash in notifier --- osmhm/send_notification.py | 11 ++++++----- setup.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/osmhm/send_notification.py b/osmhm/send_notification.py index e32d9c6..b50f87c 100644 --- a/osmhm/send_notification.py +++ b/osmhm/send_notification.py @@ -21,8 +21,8 @@ def send_notification(notify_list, notification_type, notifier=send_mail): tos = {} for entry in notify_list: - if notification_type == 'user': - if entry[6]: + if entry[6]: + if notification_type == 'user': MSG = """ Dear %s, OSM Hall Monitor has detected an event for your consideration. @@ -46,8 +46,7 @@ def send_notification(notify_list, notification_type, notifier=send_mail): TO = entry[6] NEWSUBJECT = '%s User %s ' % (SUBJECT, entry[0][2]) - elif notification_type == 'object': - if entry[6]: + elif notification_type == 'object': if 'n' == entry[0][4][0]: pre = 'node' elif 'w' == entry[0][4][0]: @@ -75,7 +74,9 @@ def send_notification(notify_list, notification_type, notifier=send_mail): TO = entry[6] NEWSUBJECT = '%s Object %s ' % (SUBJECT, entry[0][4]) - + else: + print 'Notification type unknown' + continue else: continue diff --git a/setup.py b/setup.py index cc59d73..b88a1c2 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='osm_hall_monitor', - version='0.52', + version='0.52.1', description='Passive changeset monitoring for OpenStreetMap.', url='http://github.com/ethan-nelson/osm_hall_monitor', author='Ethan Nelson',