[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - BaseConverter.py:1.1.2.3
Andreas Jung
andreas@digicool.com
Wed, 13 Mar 2002 07:11:05 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv30844
Modified Files:
Tag: ajung-textindexng-branch
BaseConverter.py
Log Message:
added constructor and additonal checks
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/BaseConverter.py 1.1.2.2 => 1.1.2.3 ===
##############################################################################
+__doc__ = """base converter class"""
+__version__ = '$Id$'
class BaseConverter:
-
""" Base class for all converters """
content_type = None
content_description = None
+
+ def __init__(self):
+ if not self.content_type:
+ raise BaseConverterError,'content_type undefinied'
+
+ if not self.content_description:
+ raise BaseConverterError,'content_description undefinied'
def getDescription(self): return self.content_description
def getType(self): return self.content_type