Commit 07684c8a authored by Jérome Perrin's avatar Jérome Perrin

when raising ImportError for missing 4Suite library, print the exact package name


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22886 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad285f86
...@@ -45,14 +45,14 @@ from zLOG import LOG, INFO, DEBUG ...@@ -45,14 +45,14 @@ from zLOG import LOG, INFO, DEBUG
try: try:
from Ft.Xml.Domlette import Print, PrettyPrint from Ft.Xml.Domlette import Print, PrettyPrint
except ImportError: except ImportError:
LOG('ERP5Conduit',0,"Can't import Print and PrettyPrint") LOG('ERP5Conduit', INFO, "Can't import Print and PrettyPrint")
class Print: class Print:
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
raise ImportError, "Sorry, it was not possible to import Ft library" raise ImportError, '4Suite-XML is not installed'
class PrettyPrint: class PrettyPrint:
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
raise ImportError, "Sorry, it was not possible to import Ft library" raise ImportError, '4Suite-XML is not installed'
class ERP5Conduit(XMLSyncUtilsMixin): class ERP5Conduit(XMLSyncUtilsMixin):
......
...@@ -13,11 +13,11 @@ try: ...@@ -13,11 +13,11 @@ try:
except ImportError: except ImportError:
class Print: class Print:
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
raise ImportError, "Sorry, it was not possible to import Ft library" raise ImportError, '4Suite-XML is not installed'
class PrettyPrint: class PrettyPrint:
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
raise ImportError, "Sorry, it was not possible to import Ft library" raise ImportError, '4Suite-XML is not installed'
class OptionParser(OptionParser): class OptionParser(OptionParser):
......
...@@ -41,7 +41,6 @@ from Publication import Publication, Subscriber ...@@ -41,7 +41,6 @@ from Publication import Publication, Subscriber
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2 from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2
from Subscription import Subscription from Subscription import Subscription
from XMLSyncUtils import Parse from XMLSyncUtils import Parse
#from Ft.Xml import Parse
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from PublicationSynchronization import PublicationSynchronization from PublicationSynchronization import PublicationSynchronization
from SubscriptionSynchronization import SubscriptionSynchronization from SubscriptionSynchronization import SubscriptionSynchronization
......
...@@ -40,7 +40,7 @@ except ImportError: ...@@ -40,7 +40,7 @@ except ImportError:
LOG('XMLSyncUtils', INFO, "Can't import Parse") LOG('XMLSyncUtils', INFO, "Can't import Parse")
class Parse: class Parse:
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
raise ImportError, "Sorry, it was not possible to import Ft library" raise ImportError, '4Suite-XML is not installed'
try: try:
from base64 import b16encode, b16decode from base64 import b16encode, b16decode
......
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