connectors/LPC/__init__.py
changeset 520 ca5a2047e0ed
parent 508 73ecb803d8af
child 523 27903000e4ea
equal deleted inserted replaced
519:3a5faff52e5c 520:ca5a2047e0ed
    16 #General Public License for more details.
    16 #General Public License for more details.
    17 #
    17 #
    18 #You should have received a copy of the GNU General Public
    18 #You should have received a copy of the GNU General Public
    19 #License along with this library; if not, write to the Free Software
    19 #License along with this library; if not, write to the Free Software
    20 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    20 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    21 import LPCObject
    21 from LPCObject import LPCObject
    22 
    22 
    23 permanant_connector = None
    23 permanant_connector = None
    24 
    24 
    25 def LPC_connector_factory(uri, pluginsroot):
    25 def LPC_connector_factory(uri, pluginsroot):
    26     """
    26     """
    27     This returns the connector to LPC style PLCobject
    27     This returns the connector to LPC style PLCobject
    28     """
    28     """
    29     global permanant_connector
    29     global permanant_connector
       
    30     servicetype, location = uri.split("://")
    30     if permanant_connector is None:
    31     if permanant_connector is None:
    31         permanant_connector  = LPCObject(pluginsroot,location)
    32         permanant_connector  = LPCObject(pluginsroot,location)
    32     else:
    33     else:
    33         servicetype, location = uri.split("://")
       
    34         permanant_connector.UpdateLocation(location)
    34         permanant_connector.UpdateLocation(location)
    35     return permanant_connector
    35     return permanant_connector
    36     
    36     
    37 
    37