1 #! /usr/bin/python
2 # $Id: roundup-mailgw,v 1.4 2001-08-03 01:28:33 richard Exp $
4 import sys
5 if int(sys.version[0]) < 2:
6 print "Roundup requires Python 2.0 or newer."
7 sys.exit(1)
9 # figure the instance home
10 import os
11 if len(sys.argv) > 1:
12 instance_home = sys.argv[1]
13 else:
14 instance_home = os.environ.get('ROUNDUP_INSTANCE', '')
15 if not instance_home:
16 print 'No instance home specified'
17 sys.exit(1)
19 # get the instance
20 import imp
21 instance = imp.load_package('instance', instance_home)
23 # invokde the mail handler
24 db = instance.open('admin')
25 handler = instance.MailGW(db)
26 handler.main(sys.stdin)
28 #
29 # $Log: not supported by cvs2svn $
30 # Revision 1.3 2001/08/03 00:59:34 richard
31 # Instance import now imports the instance using imp.load_module so that
32 # we can have instance homes of "roundup" or other existing python package
33 # names.
34 #
35 # Revision 1.2 2001/07/29 07:01:39 richard
36 # Added vim command to all source so that we don't get no steenkin' tabs :)
37 #
38 # Revision 1.1 2001/07/23 03:46:48 richard
39 # moving the bin files to facilitate out-of-the-boxness
40 #
41 # Revision 1.1 2001/07/22 11:15:45 richard
42 # More Grande Splite stuff
43 #
44 #
45 # vim: set filetype=python ts=4 sw=4 et si