[Mailman-Users] LogMsg problem
Barry A. Warsaw
bwarsaw at cnri.reston.va.us
Fri Dec 3 06:20:01 CET 1999
>>>>> "TP" == Todd Pfaff <pfaff at 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
More information about the Mailman-Users
mailing list