commit | ea72dcb05c030dc25f03cfed2aaae5ab199ba20f | [log] [tgz] |
---|---|---|
author | Andrew M. Kuchling <amk@amk.ca> | Sat Jan 19 20:14:40 2008 +0000 |
committer | Andrew M. Kuchling <amk@amk.ca> | Sat Jan 19 20:14:40 2008 +0000 |
tree | 5f9703f713b40b9c9e32d22539b26b52623a5c38 | |
parent | 5f4fc831adb8031b7824a06ac36147a8d36806bb [diff] [blame] |
Bug 1277: make Maildir use the user-provided factory instead of hard-wiring MaildirMessage.
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 46f41ce..1e04bdd 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py
@@ -315,7 +315,10 @@ subpath = self._lookup(key) f = open(os.path.join(self._path, subpath), 'r') try: - msg = MaildirMessage(f) + if self._factory: + msg = self._factory(f) + else: + msg = MaildirMessage(f) finally: f.close() subdir, name = os.path.split(subpath)