fail gracefully when opensrf.settings is not up and running
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 30 Nov 2010 14:27:30 +0000 (14:27 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 30 Nov 2010 14:27:30 +0000 (14:27 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2119 9efc2488-bf62-4759-914b-345cdb29e865

src/python/opensrf.py.in

index cbfdbb7..cddbab1 100755 (executable)
@@ -92,7 +92,11 @@ def do_init():
     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')