[Mailman-Developers] Patch: Optionally Suppressing List Headers
Barry A. Warsaw
barry@digicool.com
Thu, 5 Apr 2001 13:23:16 -0400
>>>>> "JRA" == Jay R Ashworth <jra@baylink.com> writes:
JRA> Oh. It sounded to *me* like the read-in would fail.
JRA> Misunderstood.
JRA> Then what's the problem?
The read succeeds but the resulting MailList instance won't have the
new attribute. When the module tries to access that attribute, you'll
get an AttributeError. This /could/ be worked around by using
something like:
if getattr(mlist, 'my_new_attribute', 0):
instead of
if mlist.my_new_attribute:
The getattr() approach doesn't raise an exception when given a default
value.
-Barry