diff MoinMoin/config/multiconfig.py @ 2331:493565b060ff

Raise exception if notifications are enabled but no secret is set.
author Karol Nowak <grzywacz@sul.uni.lodz.pl>
date Tue, 26 Jun 2007 16:39:06 +0200
parents c142804478c7
children 10be78f1fa97
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Tue Jun 26 15:25:15 2007 +0200
+++ b/MoinMoin/config/multiconfig.py	Tue Jun 26 16:39:06 2007 +0200
@@ -683,6 +683,14 @@
         
         # if we are to use the jabber bot, instantiate a server object for future use
         if self.jabber_enabled:
+            
+            errmsg = "You must set a (long) secret string to send notifications!"
+            try:
+                if not self.secret:
+                    raise error.ConfigurationError(errmsg)
+            except AttributeError, err:
+                    raise error.ConfigurationError(errmsg)
+            
             from xmlrpclib import Server
             self.notification_server = Server(self.notification_bot_uri, )