[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - Converter.py:1.1.2.2

Andreas Jung andreas@digicool.com
Tue, 26 Feb 2002 18:56:49 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv23535

Modified Files:
      Tag: ajung-textindexng-branch
	Converter.py 
Log Message:
minor fix


=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/Converter.py 1.1.2.1 => 1.1.2.2 ===
 import converters
 
+_basedir = os.path.dirname(__file__)
 _default_cfg = 'converters.ini'
 
 
@@ -26,7 +27,7 @@
     converters = {}
 
     def __init__(self):
-        self.readConfig(_default_cfg)
+        self.readConfig( os.path.join(_basedir, _default_cfg))
 
 
     def addConverter(self, extension=None, mimetype=None, callback=None):
@@ -44,6 +45,7 @@
         lines = open(fname).readlines()
 
         for line in lines:
+            if not line.strip() or line.startswith('#'): continue
 
             exts,mt,func = line.split(';')
             exts = exts.split(',')