[project @ Require a resource for JIDs that are used for XML-RPC messages]
authorDiane Trout <diane@caltech.edu>
Mon, 10 Dec 2007 21:05:44 +0000 (21:05 +0000)
committerDiane Trout <diane@caltech.edu>
Mon, 10 Dec 2007 21:05:44 +0000 (21:05 +0000)
obviously this requires a version of benderjab that has that
feature added

gaworkflow/copier.py

index 265e7802c7e0f31aafc9d14dbd07d1f20ee93c0a..0e10aa098ade317c35a60b1379761a275af05ecc 100644 (file)
@@ -151,7 +151,14 @@ class CopierBot(rpc.XmlRpcBot):
         self.rsync = rsync(source, destination, password)
         
         self.notify_users = self._parse_user_list(self.cfg['notify_users'])
-        self.notify_runner = self._parse_user_list(self.cfg['notify_runner'])
+        try:
+          self.notify_runner = \
+             self._parse_user_list(self.cfg['notify_runner'],
+                                   require_resource=True)
+        except bot.JIDMissingResource:
+            msg = 'need a full jabber ID + resource for xml-rpc destinations'
+            logging.FATAL(msg)
+            raise bot.JIDMissingResource(msg)
 
     def startCopy(self, *args):
         """