summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorLiutauras Adomaitis <adomaitis@kolabsys.com>2018-06-26 09:49:03 +0300
committerLiutauras Adomaitis <adomaitis@kolabsys.com>2018-06-26 16:53:21 +0300
commit125f15d38762daad1042e913fdd927d6ad74e632 (patch)
tree0182e75778cc738ca5c35e5a57545826dce97b0c /pykolab
parent6107a8a7bfba971e4abcbd551b3d689250d91ac3 (diff)
downloadpykolab-125f15d38762daad1042e913fdd927d6ad74e632.tar.gz
Fix 'undelete-mailbox' issue for undeleting all user's mailboxes
Summary: if 'hextimestamp' key does not exists in _mailfolder dictionary, pykolab throughs traceback. Test Plan: None Reviewers: vanmeeuwen, machniak Reviewed By: machniak Subscribers: petersen Differential Revision: https://git.kolab.org/D605
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/imap/cyrus.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 9907c44..15a7d00 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -195,7 +195,7 @@ class Cyrus(cyruslib.CYRUS):
)
# TODO: Workaround for undelete
- if len(self.lm(mailfolder)) < 1 and _mailfolder['hex_timestamp']:
+ if len(self.lm(mailfolder)) < 1 and 'hex_timestamp' in _mailfolder:
mailfolder = self.folder_utf7("DELETED/%s%s%s@%s" % (
self.separator.join(_mailfolder['path_parts']),
self.separator,