[Opensrf-commits] r2120 - branches/rel_2_0/src/python (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 30 09:27:51 EST 2010


Author: erickson
Date: 2010-11-30 09:27:50 -0500 (Tue, 30 Nov 2010)
New Revision: 2120

Modified:
   branches/rel_2_0/src/python/opensrf.py.in
Log:
fail gracefully when opensrf.settings is not up and running

Modified: branches/rel_2_0/src/python/opensrf.py.in
===================================================================
--- branches/rel_2_0/src/python/opensrf.py.in	2010-11-30 14:27:30 UTC (rev 2119)
+++ branches/rel_2_0/src/python/opensrf.py.in	2010-11-30 14:27:50 UTC (rev 2120)
@@ -92,7 +92,11 @@
     else:
         domain = osrf.conf.get('domain')
 
-    osrf.set.load(domain)
+    try:
+        osrf.set.load(domain)
+    except osrf.net.XMPPNoRecipient:
+        print "* Unable to communicate with opensrf.settings.  Giving up..."
+        return
 
     settings = osrf.set.get('apps')
     activeapps = osrf.set.get('activeapps')



More information about the opensrf-commits mailing list