Bugfix
* python/libmu_py/mailbox.c (api_mailbox_create_default): Make name optional. * python/mailutils/mailbox.py (MailboxDefault.__init__): Likewise.
Showing
2 changed files
with
2 additions
and
2 deletions
... | @@ -106,7 +106,7 @@ api_mailbox_create_default (PyObject *self, PyObject *args) | ... | @@ -106,7 +106,7 @@ api_mailbox_create_default (PyObject *self, PyObject *args) |
106 | char *name; | 106 | char *name; |
107 | PyMailbox *py_mbox; | 107 | PyMailbox *py_mbox; |
108 | 108 | ||
109 | if (!PyArg_ParseTuple (args, "O!s", &PyMailboxType, &py_mbox, &name)) | 109 | if (!PyArg_ParseTuple (args, "O!z", &PyMailboxType, &py_mbox, &name)) |
110 | return NULL; | 110 | return NULL; |
111 | 111 | ||
112 | status = mu_mailbox_create_default (&py_mbox->mbox, name); | 112 | status = mu_mailbox_create_default (&py_mbox->mbox, name); | ... | ... |
... | @@ -203,7 +203,7 @@ class Mailbox (MailboxBase): | ... | @@ -203,7 +203,7 @@ class Mailbox (MailboxBase): |
203 | del self.mbox | 203 | del self.mbox |
204 | 204 | ||
205 | class MailboxDefault (MailboxBase): | 205 | class MailboxDefault (MailboxBase): |
206 | def __init__ (self, name): | 206 | def __init__ (self, name = None): |
207 | self.mbox = mailbox.MailboxType () | 207 | self.mbox = mailbox.MailboxType () |
208 | status = mailbox.create_default (self.mbox, name) | 208 | status = mailbox.create_default (self.mbox, name) |
209 | if status: | 209 | if status: | ... | ... |
-
Please register or sign in to post a comment