[open-ils-commits] r8884 - in trunk/Open-ILS/src/python/oils: . utils

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 6 12:03:50 EST 2008


Author: erickson
Date: 2008-03-06 11:31:19 -0500 (Thu, 06 Mar 2008)
New Revision: 8884

Modified:
   trunk/Open-ILS/src/python/oils/system.py
   trunk/Open-ILS/src/python/oils/utils/idl.py
Log:
fetching IDL from new open-ils idl method.  added a remote_connect option for clients who are not on the private network

Modified: trunk/Open-ILS/src/python/oils/system.py
===================================================================
--- trunk/Open-ILS/src/python/oils/system.py	2008-03-06 16:26:58 UTC (rev 8883)
+++ trunk/Open-ILS/src/python/oils/system.py	2008-03-06 16:31:19 UTC (rev 8884)
@@ -25,3 +25,14 @@
 	    osrf.system.System.connect(**kwargs)
 	    IDLParser.parse()
 	    oilsLoadCSEditor()
+
+    @staticmethod
+    def remote_connect(**kwargs):
+	    """
+            Connects to the opensrf network,  parses the IDL file, and loads the CSEditor.
+            This version of connect does not talk to opensrf.settings, which means it 
+            also does not connect to the opensrf cache.
+        """
+	    osrf.system.System.net_connect(**kwargs)
+	    IDLParser.parse()
+	    oilsLoadCSEditor()

Modified: trunk/Open-ILS/src/python/oils/utils/idl.py
===================================================================
--- trunk/Open-ILS/src/python/oils/utils/idl.py	2008-03-06 16:26:58 UTC (rev 8883)
+++ trunk/Open-ILS/src/python/oils/utils/idl.py	2008-03-06 16:31:19 UTC (rev 8884)
@@ -13,8 +13,9 @@
 biblio.record_entry
 """
 import sys, string, xml.dom.minidom
-import osrf.net_obj, osrf.log, osrf.set, osrf.ex
-from oils.const import OILS_NS_OBJ, OILS_NS_PERSIST, OILS_NS_REPORTER
+#import osrf.net_obj, osrf.log, osrf.set, osrf.ex, osrf.ses
+import osrf.net_obj, osrf.log, osrf.ex, osrf.ses
+from oils.const import OILS_NS_OBJ, OILS_NS_PERSIST, OILS_NS_REPORTER, OILS_APP_ACTOR
 
 class IDLException(osrf.ex.OSRFException):
     pass
@@ -40,7 +41,9 @@
             the global IDL repository '''
         if IDLParser._global_parser is None:
             parser = IDLParser()
-            parser.set_IDL(osrf.set.get('IDL'))
+            idl_path = osrf.ses.ClientSession.atomic_request(
+                OILS_APP_ACTOR, 'opensrf.open-ils.fetch_idl.file')
+            parser.set_IDL(idl_path)
             parser.parse_IDL()
             IDLParser._global_parser = parser
 



More information about the open-ils-commits mailing list