changeset 2315:69ed234c3241

Bail out if the secret string is empty.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Fri, 22 Jun 2007 18:59:40 +0200
parents 38b6ba04671b
children 02824b69a95c 463dfc178337
files MoinMoin/events/jabbernotify.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/events/jabbernotify.py	Fri Jun 22 18:54:13 2007 +0200
+++ b/MoinMoin/events/jabbernotify.py	Fri Jun 22 18:59:40 2007 +0200
@@ -10,11 +10,12 @@
 
 import xmlrpclib
 
+from MoinMoin import error
+from MoinMoin.Page import Page
 from MoinMoin.user import User, getUserList
-from MoinMoin.Page import Page
+from MoinMoin.events.messages import page_change_message
 
 import MoinMoin.events as ev
-from MoinMoin.events.messages import page_change_message
 
 
 def handle(event):
@@ -23,6 +24,10 @@
     # Check for desired event type and if notification bot is configured
     if not cfg.jabber_enabled:
         return
+    
+    if not cfg.secret:
+        errmsg = "You must set a (long) secret string to send notifications!"
+        raise error.ConfigurationError(errmsg)
 
     if isinstance(event, ev.PageChangedEvent):
         return handle_page_changed(event)