Message4221
John,
First a good new year to you.
Thanks for the feedback.
You are raising a valid point here, one of the goals of the refactoring
is easier override of the message parsing and that isn't achieved with
my change.
I still think that it's a good idea to put all the state during message
parsing into a separate object for maintainability reasons.
I've now introduced in r4578 a class variable of MailGW named
parsed_message_class that by default points to the parsedMessage in
mailgw.py, you still have to override both classes but the code will not
duplicate existing long methods. With that change your use-case becomes:
# import roundup stuff here
class OurParsedMessage(parsedMessage):
def handle_help(self):
return
class OurMailGW(MailGW):
parsed_message_class = OurParsedMessage
# define 'instance' and 'mailbox' here
gw = OurMailGW(instance, {})
gw.do_mailbox(mailbox)
Can you live with that?
Ralf |
|
Date |
User |
Action |
Args |
2011-01-10 16:07:47 | schlatterbeck | set | messageid: <1294675667.17.0.662123232115.issue2550576@psf.upfronthosting.co.za> |
2011-01-10 16:07:47 | schlatterbeck | set | recipients:
+ schlatterbeck, jerrykan |
2011-01-10 16:07:47 | schlatterbeck | link | issue2550576 messages |
2011-01-10 16:07:46 | schlatterbeck | create | |
|