Commit 4527a513 4527a513594f206ba87191c555bb5b399d795af2 by Wojciech Polak

Bugfix

* python/libmu_py/mailbox.c (api_mailbox_create_default): Make name
optional.
* python/mailutils/mailbox.py (MailboxDefault.__init__): Likewise.
1 parent 6eb89fe3
......@@ -106,7 +106,7 @@ api_mailbox_create_default (PyObject *self, PyObject *args)
char *name;
PyMailbox *py_mbox;
if (!PyArg_ParseTuple (args, "O!s", &PyMailboxType, &py_mbox, &name))
if (!PyArg_ParseTuple (args, "O!z", &PyMailboxType, &py_mbox, &name))
return NULL;
status = mu_mailbox_create_default (&py_mbox->mbox, name);
......
......@@ -203,7 +203,7 @@ class Mailbox (MailboxBase):
del self.mbox
class MailboxDefault (MailboxBase):
def __init__ (self, name):
def __init__ (self, name = None):
self.mbox = mailbox.MailboxType ()
status = mailbox.create_default (self.mbox, name)
if status:
......