diff roundup/scripts/roundup_mailgw.py @ 2633:a9e1fff1e793

I thought I committed this last night. Ho hum. - This implements most of the rest of the new tracker config layout: - dbinit.py split between schema.py and initial_data.py - interfaces.py gone - tracker and detectors __init__.py gone - Added some missing functionality to backends: db_exists test and db_nuke. - Implemented configuration file options in postgresql backend. - Cleaned up tracker initialisation a lot.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 27 Jul 2004 00:57:19 +0000
parents c26bb78d2f0c
children 437775793d8e
line wrap: on
line diff
--- a/roundup/scripts/roundup_mailgw.py	Tue Jul 27 00:45:49 2004 +0000
+++ b/roundup/scripts/roundup_mailgw.py	Tue Jul 27 00:57:19 2004 +0000
@@ -14,7 +14,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# $Id: roundup_mailgw.py,v 1.18 2004-05-28 00:56:50 richard Exp $
+# $Id: roundup_mailgw.py,v 1.19 2004-07-27 00:57:18 richard Exp $
 
 """Command-line script stub that calls the roundup.mailgw.
 """
@@ -26,7 +26,7 @@
 
 import sys, os, re, cStringIO, getopt
 
-from roundup.mailgw import Message
+from roundup import mailgw
 from roundup.i18n import _
 
 def usage(args, message=None):
@@ -132,7 +132,10 @@
 
     # now wrap in try/finally so we always close the database
     try:
-        handler = instance.MailGW(instance, db, optionsList)
+        if hasattr(instance, 'MailGW'):
+            handler = instance.MailGW(instance, db, optionsList)
+        else:
+            handler = mailgw.MailGW(instance, db, optionsList)
 
         # if there's no more arguments, read a single message from stdin
         if len(args) == 1:

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