Mercurial > p > roundup > code
view roundup/anypy/email_.py @ 4478:e7dcec8c40e9
- Add regression test for -c option to mailgw
.-- bug in issue2550697 wasn't noticed, it would be now.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Thu, 14 Apr 2011 07:07:22 +0000 |
| parents | 9d37875416c3 |
| children | c426cb251bc7 |
line wrap: on
line source
try: # Python 2.5+ from email.parser import FeedParser except ImportError: # Python 2.4 try : from email.Parser import FeedParser except ImportError: from email.Parser import Parser class FeedParser: def __init__(self): self.content = [] def feed(self, s): self.content.append(s) def close(self): p = Parser() return p.parsestr(''.join(self.content))
