Code

Used the much nicer load_package, pointed out by Steve Majewski.
[roundup.git] / roundup-mailgw
index 94a1d38ca7d36690fa984815e1b8ea9a5a44646f..f359d5fdec7108c78c71fecc6e9b78e3225346d7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /usr/bin/python
-# $Id: roundup-mailgw,v 1.3 2001-08-03 00:59:34 richard Exp $
+# $Id: roundup-mailgw,v 1.4 2001-08-03 01:28:33 richard Exp $
 
 import sys
 if int(sys.version[0]) < 2:
@@ -18,7 +18,7 @@ if not instance_home:
 
 # get the instance
 import imp
-instance = imp.load_module('instance', None, instance_home, ('', '', 5))
+instance = imp.load_package('instance', instance_home)
 
 # invokde the mail handler
 db = instance.open('admin')
@@ -27,6 +27,11 @@ handler.main(sys.stdin)
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.3  2001/08/03 00:59:34  richard
+# 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.
+#
 # 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 :)
 #