summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-12-20 19:05:17 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-12-20 19:05:17 +0100
commit8df8b3a8108ba601a1295319c280810eed1eb3d9 (patch)
tree3d052999a1604015da9b374f098e39c3c4a93b1f /pykolab
parentd47df7610850c594e549e608006f35b0a70b9ae0 (diff)
downloadpykolab-8df8b3a8108ba601a1295319c280810eed1eb3d9.tar.gz
Avoid trickery in the annotation name and shared namespace
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/imap/cyrus.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index 2057a38..09271fa 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -219,17 +219,19 @@ class Cyrus(cyruslib.CYRUS):
max_tries = 20
num_try = 0
- annotation_path = "/shared/vendor/cmu/cyrus-imapd/server"
+ ann_path = "/vendor/cmu/cyrus-imapd/server"
+ s_ann_path = "/shared%s" % (ann_path)
while 1:
num_try += 1
annotations = self._getannotation(
mailfolder,
- annotation_path
+ ann_path
)
if annotations.has_key(mailfolder):
- break
+ if annotations[mailfolder].has_key(s_ann_path):
+ break
if max_tries <= num_try:
log.error(
@@ -240,7 +242,7 @@ class Cyrus(cyruslib.CYRUS):
annotations = {
mailfolder: {
- annotation_path: self.server
+ s_ann_path: self.server
}
}
@@ -255,7 +257,7 @@ class Cyrus(cyruslib.CYRUS):
time.sleep(1)
- server = annotations[mailfolder][annotation_path]
+ server = annotations[mailfolder][s_ann_path]
self.mbox[mailfolder] = server
log.debug(