From 85cf47d5570fe29fb0bd8c39801b799faee56780 Mon Sep 17 00:00:00 2001
From: Kevin Deldycke <kevin@nexedi.com>
Date: Fri, 28 Jan 2005 11:06:32 +0000
Subject: [PATCH] *** empty log message ***

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2320 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5SyncML/XMLSyncUtils.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/product/ERP5SyncML/XMLSyncUtils.py b/product/ERP5SyncML/XMLSyncUtils.py
index c302834d6a..014c3e63ee 100755
--- a/product/ERP5SyncML/XMLSyncUtils.py
+++ b/product/ERP5SyncML/XMLSyncUtils.py
@@ -920,7 +920,6 @@ class XMLSyncUtils(XMLSyncUtilsMixin):
       Send the server modification, this happens after the Synchronization
       initialization
     """
-    #from Products.ERP5SyncML.Conduit.ERP5Conduit import ERP5Conduit
     from Products.ERP5SyncML import Conduit
     has_response = 0 #check if syncmodif replies to this messages
     cmd_id = 1 # specifies a SyncML message-unique command identifier
@@ -967,13 +966,10 @@ class XMLSyncUtils(XMLSyncUtilsMixin):
                                          remote_xml=remote_xml)
 
     alert_code = self.getAlertCode(remote_xml)
-    #conduit = ERP5Conduit()
+    # Import the conduit and get it
     conduit_name = subscriber.getConduit()
-    LOG('getConduit: conduit_name',0,conduit_name)
-    LOG('getConduit: Conduit',0,Conduit)
-    LOG('getConduit: getattr(Conduit,conduit_name)',0,getattr(Conduit,conduit_name))
-    LOG('getConduit: getattargetattr(Conduit,conduit_name)',0,getattr(getattr(Conduit,conduit_name),conduit_name))
-    conduit = getattr(getattr(Conduit,conduit_name),conduit_name)()
+    conduit_module = __import__('.'.join([Conduit.__name__, conduit_name]), globals(), locals(), [''])
+    conduit = getattr(conduit_module, conduit_name)()
     LOG('SyncModif, subscriber: ',0,subscriber)
     # Then apply the list of actions
     (xml_confirmation,has_next_action,cmd_id) = self.applyActionList(cmd_id=cmd_id,
-- 
2.30.9