--- pythonfilter.orig Tue Jan 23 17:30:50 2007 +++ pythonfilter Thu Jan 25 19:34:11 2007 @@ -71,17 +71,15 @@ # First, locate and open the configuration file. config = None try: - configDirs = ('/etc', '/usr/local/etc') - for x in configDirs: - if os.access('%s/pythonfilter.conf' % x, os.R_OK): - config = open('%s/pythonfilter.conf' % x) - break + configDir = ('%%PREFIX%%/etc') + if os.access('%s/pythonfilter.conf' % configDir, os.R_OK): + config = open('%s/pythonfilter.conf' % configDir) except IOError: sys.stderr.write('Could not open config file for reading.\n') sys.exit() if not config: - sys.stderr.write('Could not locate a configuration file in any of: %s\n' % - configDirs) + sys.stderr.write('Could not locate a configuration file in %s\n' % + configDir) sys.exit() # Read the lines from the configuration file and load any module listed # therein. Ignore lines that begin with a hash character. @@ -106,7 +104,7 @@ sys.stderr.write('Failed to load "doFilter" ' 'function from %s\n' % moduleName) - sys.stderr.write('Exception : %s:%s\n' % + sys.stderr.write('Exception: %s:%s\n' % (importError[0], importError[1])) sys.stderr.write(string.join(traceback.format_tb(importError[2]), ''))