[Pkg-mailman-hackers] Bug#702002: Bug#702002: mailman: Init script produces "Error in sys.excepthook" in list_lists

Thorsten Glaser t.glaser at tarent.de
Mon Mar 4 08:42:28 UTC 2013


On Fri, 1 Mar 2013, Cedric Knight wrote:

> On running
>    /etc/init.d/mailman start

> close failed in file object destructor:
> Error in sys.excepthook:

I think I committed this in r731 already but didn’t upload
due to the freeze. Can you please test that the following
patch fixes your problem?

Index: trunk/debian/mailman.init
===================================================================
--- trunk/debian/mailman.init	(revision 730)
+++ trunk/debian/mailman.init	(revision 731)
@@ -44,15 +44,21 @@
 	exit 0;
 fi
 
+# Just a newline.
+nl='
+'
+
 case "$1" in
   start)
     SITE_LIST=$( sed -rne "s/^[[:space:]]*MAILMAN_SITE_LIST[[:space:]]*=[[:space:]]*(['\"])([^'\"]+)\\1/\\2/p" /etc/mailman/mm_cfg.py )
     [ -n "$SITE_LIST" ] || SITE_LIST='mailman'
-    if ! /var/lib/mailman/bin/list_lists -b | grep -q "^${SITE_LIST}$"; then
+    case "$nl$(/var/lib/mailman/bin/list_lists -b)" in
+    (*$nl$SITE_LIST$nl*) ;;
+    (*)
         log_warning_msg "Site list for mailman missing (looking for list named '${SITE_LIST}')."
         log_warning_msg "Please create it; until then, mailman will refuse to start."
-        exit 0;
-    fi
+        exit 0 ;;
+    esac
     log_daemon_msg "Starting Mailman master qrunner" "mailmanctl"
     if $DAEMON -s -q start; then
         log_end_msg 0
Index: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	(revision 730)
+++ trunk/debian/changelog	(revision 731)
@@ -1,3 +1,9 @@
+mailman (1:2.1.15-2) UNRELEASED; urgency=low
+
+  * Prevent losing stderr in the init script when there are many lists.
+
+ -- Thorsten Glaser <tg at mirbsd.de>  Sun, 23 Sep 2012 22:11:28 +0200
+
 mailman (1:2.1.15-1) unstable; urgency=low
 
   * New upstream release.

Thanks,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke



More information about the Pkg-mailman-hackers mailing list