[Mailman-Developers] Re: [Mailman-Users] LogMsg problem

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Fri, 3 Dec 1999 00:20:01 -0500 (EST)


>>>>> "TP" == Todd Pfaff <pfaff@edge.cis.mcmaster.ca> writes:

    TP> It seems that, in general, the use of LogMsg is inconsistent.

You're right about that.  It would be a good thing to clean up the use
of LogMsg.  I usually do the substitution before passing it to LogMsg,
but some of the older code does it the other way.

    TP> Any opinions about whether this is
    TP> a good idea, whether it will work, or whether there is a
    TP> better way to approach this problem?

    |         try:
    |             logf.write(msg % args + '\n')
    |         except:
    |             logf.write(msg + '\n')

Just a point of Python style.  It's almost never appropriate to use a
"bare" except like this because it can mask unexpected exceptions.  In
this case using "except TypeError" would do the trick.

This is probably okay as a stopgap, but it would be better to make the
use of LogMsg more consistent.

-Barry