ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/mail/courier-pythonfilter/files/patch-pythonfilter
Revision: 16349
Committed: Sun Apr 20 18:32:36 2014 UTC (9 years, 11 months ago) by laffer1
File size: 1435 byte(s)
Log Message:
remove cvs2svn:cvs-rev prop

File Contents

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