[Opensrf-commits] r1082 - trunk/src/python/osrf

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Aug 18 21:37:45 EDT 2007


Author: erickson
Date: 2007-08-18 21:33:21 -0400 (Sat, 18 Aug 2007)
New Revision: 1082

Modified:
   trunk/src/python/osrf/net.py
   trunk/src/python/osrf/system.py
Log:
not creating new handle if the current thread already has one.  changed resource layout

Modified: trunk/src/python/osrf/net.py
===================================================================
--- trunk/src/python/osrf/net.py	2007-08-19 01:16:02 UTC (rev 1081)
+++ trunk/src/python/osrf/net.py	2007-08-19 01:33:21 UTC (rev 1082)
@@ -70,7 +70,7 @@
         self.isconnected = False
 
         # Create a unique jabber resource
-        resource = 'python_'
+        resource = 'python'
         if args.has_key('resource'):
             resource = args['resource']
         resource += '_' + gethostname()+':'+ str(os.getpid()) + '_'+ threading.currentThread().getName().lower()

Modified: trunk/src/python/osrf/system.py
===================================================================
--- trunk/src/python/osrf/system.py	2007-08-19 01:16:02 UTC (rev 1081)
+++ trunk/src/python/osrf/system.py	2007-08-19 01:33:21 UTC (rev 1082)
@@ -24,6 +24,10 @@
 def osrfConnect(configFile, configContext):
     """ Connects to the opensrf network """
 
+    if osrfGetNetworkHandle():
+        ''' This thread already has a handle '''
+        return
+
     # parse the config file
     configParser = osrfConfig(configFile, configContext)
     configParser.parseConfig()



More information about the opensrf-commits mailing list