Place back ImportError guards that allowed AdvancedSearchTextParser to be used...

Place back ImportError guards that allowed AdvancedSearchTextParser to be used without interface definitions and checks.

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29460 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2e73c565
...@@ -27,9 +27,20 @@ ...@@ -27,9 +27,20 @@
############################################################################## ##############################################################################
from lexer import lexer, update_docstrings from lexer import lexer, update_docstrings
from Products.ZSQLCatalog.interfaces.abstract_syntax_node import INode, IValueNode, ILogicalNode, IColumnNode try:
from zope.interface.verify import verifyClass from Products.ZSQLCatalog.interfaces.abstract_syntax_node import INode, IValueNode, ILogicalNode, IColumnNode
from zope.interface import implements from zope.interface.verify import verifyClass
from zope.interface import implements
except ImportError:
# allow this module to be imported by stand-alone scripts without
# Products.ZSQLCatalog.interfaces or zope.interface around.
INode = None
IValueNode = None
ILogicalNode = None
IColumnNode = None
def verifyClass(*args, **kw):
pass
implements = verifyClass
class Node(object): class Node(object):
......
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