[Mailman-Developers] transcheck

Simone Piunno pioppo@ferrara.linux.it
Sun Oct 27 13:20:04 2002


On Sun, Oct 27, 2002 at 12:21:57AM +0200, Danny Terweij wrote:

> transcheck from beta4 gives a error
> 
> ./transcheck
>   File "./transcheck", line 47
>     print >> fd, _(__doc__)
>            ^
> SyntaxError: invalid syntax

me too. 
in my case the problem was that the 1st line hasn't been substituted
with the right python location (I've configured and compiled
--with-python=/usr/bin/python2).  
Probably you are in the same situation.

If you manually change the 1st line, another error immediatly appears,
introduced by the stderr->stdout conversion for usage().

This is the fix for both:

Index: bin/transcheck
===================================================================
RCS file: /cvsroot/mailman/mailman/bin/transcheck,v
retrieving revision 2.2
diff -u -r2.2 transcheck
--- bin/transcheck      21 Oct 2002 22:36:56 -0000      2.2
+++ bin/transcheck      27 Oct 2002 13:19:34 -0000
@@ -1,6 +1,6 @@
-#! /usr/bin/env python
+#! @PYTHON@
 #
-# transcheck - (c) 2002 by Simone Piunno <pioppo@ferrara.linux.it>
+# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software
Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it
 # under the terms of the version 2.0 of the GNU General Public License
 # as
@@ -39,7 +39,7 @@
 
 
 

-def usage(code, msg):
+def usage(code, msg=''):
     if code:
         fd = sys.stderr
     else:


-- 
Adde parvum parvo magnus acervus erit.
Simone Piunno, FerraraLUG - http://members.ferrara.linux.it/pioppo