Mercurial > p > roundup > code
diff roundup-mailgw @ 190:996eaf90c01e
Instance import now imports the instance using imp.load_module...
...so that we can have instance homes of "roundup" or other existing
python package names.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 03 Aug 2001 00:59:34 +0000 |
| parents | 0791d13baea7 |
| children | 241a0323aacb |
line wrap: on
line diff
--- a/roundup-mailgw Thu Aug 02 10:26:26 2001 +0000 +++ b/roundup-mailgw Fri Aug 03 00:59:34 2001 +0000 @@ -1,5 +1,5 @@ #! /usr/bin/python -# $Id: roundup-mailgw,v 1.2 2001-07-29 07:01:39 richard Exp $ +# $Id: roundup-mailgw,v 1.3 2001-08-03 00:59:34 richard Exp $ import sys if int(sys.version[0]) < 2: @@ -17,10 +17,8 @@ sys.exit(1) # get the instance -path, instance = os.path.split(instance_home) -sys.path.insert(0, path) -instance = __import__(instance) -sys.path[0] +import imp +instance = imp.load_module('instance', None, instance_home, ('', '', 5)) # invokde the mail handler db = instance.open('admin') @@ -29,6 +27,9 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.2 2001/07/29 07:01:39 richard +# Added vim command to all source so that we don't get no steenkin' tabs :) +# # Revision 1.1 2001/07/23 03:46:48 richard # moving the bin files to facilitate out-of-the-boxness #
