--- a/VirtualMailManager/mailbox.py Wed Jul 28 02:52:08 2010 +0000
+++ b/VirtualMailManager/mailbox.py Wed Jul 28 03:43:59 2010 +0000
@@ -275,18 +275,15 @@
__slots__ = ()
-def __get_mailbox_class(mbfmt):
+def new(account):
+ """Create a new Mailbox instance for the given Account."""
+ mbfmt = account.mail_location.mbformat
if mbfmt == 'maildir':
- return Maildir
+ return Maildir(account)
elif mbfmt == 'mdbox':
- return MultiDbox
+ return MultiDbox(account)
elif mbfmt == 'sdbox':
- return SingleDbox
+ return SingleDbox(account)
raise ValueError('unsupported mailbox format: %r' % mbfmt)
-
-def new(account):
- """Create a new Mailbox instance for the given Account."""
- return __get_mailbox_class(account.mail_location.mbformat)(account)
-
del cfg_dget