Commit 80d332d4 authored by Nicolas Delaby's avatar Nicolas Delaby

Fix import of Conduit from Extensions

imp.load_source does not compile dependencies
parent a27c40b6
......@@ -28,7 +28,6 @@
##############################################################################
import smtplib
from App.config import getConfiguration
from Products.CMFCore.utils import getToolByName
from ERP5Diff import ERP5Diff
from zLOG import LOG, INFO
......@@ -123,9 +122,8 @@ def getConduitByName(conduit_name):
conduit_name = conduit_name.split('.')[-1]
conduit_module = __import__(path, globals(), locals(), [''])
elif conduit_name.startswith('Extensions'):
path = "%s/%s.py" %(getConfiguration().instancehome, conduit_name.replace('.', '/'))
conduit_module = __import__(conduit_name, globals(), locals(), [''])
conduit_name = conduit_name.split('.')[-1]
conduit_module = load_source(conduit_name, path, file(path))
else:
from Products.ERP5SyncML import Conduit
conduit_module = __import__('.'.join([Conduit.__name__, conduit_name]),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment