Skip to content

Commit

Permalink
Fix crash in notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-nelson committed Dec 17, 2016
1 parent b3ca9dd commit 86a1b8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions osmhm/send_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]:
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 86a1b8b

Please sign in to comment.