diff roundup-mailgw @ 204:c1461733cbf9

Instances are now opened by a special function... ...that generates a unique module name for the instances on import time.
author Richard Jones <richard@users.sourceforge.net>
date Sun, 05 Aug 2001 07:44:36 +0000
parents 241a0323aacb
children d45384bc6420
line wrap: on
line diff
--- a/roundup-mailgw	Sun Aug 05 07:07:58 2001 +0000
+++ b/roundup-mailgw	Sun Aug 05 07:44:36 2001 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/python
-# $Id: roundup-mailgw,v 1.4 2001-08-03 01:28:33 richard Exp $
+# $Id: roundup-mailgw,v 1.5 2001-08-05 07:44:25 richard Exp $
 
 import sys
 if int(sys.version[0]) < 2:
@@ -17,8 +17,8 @@
     sys.exit(1)
 
 # get the instance
-import imp
-instance = imp.load_package('instance', instance_home)
+import roundup.instance
+instance = roundup.instance.open(instance_home)
 
 # invokde the mail handler
 db = instance.open('admin')
@@ -27,6 +27,9 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.4  2001/08/03 01:28:33  richard
+# Used the much nicer load_package, pointed out by Steve Majewski.
+#
 # 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

Roundup Issue Tracker: http://roundup-tracker.org/