[Mailman-Developers] Re: [Mailman-Users] LogMsg problem
Barry A. Warsaw
email@example.com (Barry A. Warsaw)
Fri, 3 Dec 1999 00:20:01 -0500 (EST)
>>>>> "TP" == Todd Pfaff <firstname.lastname@example.org> 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?
| logf.write(msg % args + '\n')
| 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.