summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-09-09 15:07:41 -0300
committerDuda Dornelles <ddornell@thoughtworks.com>2014-09-09 15:07:41 -0300
commitb52104f908d668aec39e563923c7f04c05e5f221 (patch)
treef9ce3168d9b4c1c8e1b9e521c34240f5307ce122 /src/leap/mail/imap
parent6ee0c7040d9bf8bb9f0fb33dccf80ea6a456c58c (diff)
addMailbox shouldn't accept empty names since it makes it impossible to retrieve it later
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/account.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/leap/mail/imap/account.py b/src/leap/mail/imap/account.py
index 74ec11e..70ed13b 100644
--- a/src/leap/mail/imap/account.py
+++ b/src/leap/mail/imap/account.py
@@ -187,6 +187,8 @@ class SoledadBackedAccount(WithMsgFields, IndexedDB, MBoxParser):
"""
name = self._parse_mailbox_name(name)
+ leap_assert(name, "Need a mailbox name to create a mailbox")
+
if name in self.mailboxes:
raise imap4.MailboxCollision(repr(name))