--- a/src/pyams_notify/event.py Fri Jan 26 17:36:18 2018 +0100
+++ b/src/pyams_notify/event.py Wed Feb 07 12:38:16 2018 +0100
@@ -111,7 +111,10 @@
request = query_request()
if request is None:
return
- ws = WebSocketClient('ws://{0}/notify'.format(request.registry.settings.get('pyams_notify.tcp_handler')))
+ handler = request.registry.settings.get('pyams_notify.tcp_handler')
+ if not handler:
+ return
+ ws = WebSocketClient('ws://{0}/notify'.format(handler))
ws.connect()
try:
json_data = json.dumps(event, cls=NotificationEncoder)