Projects
Kolab:3.4
pykolab
0005-Fix-a-parse-error-in-creating-additional-f...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-Fix-a-parse-error-in-creating-additional-folders-for.patch of Package pykolab (Revision 125)
Currently displaying revision
125
,
Show latest
From af36c305dad7016ef02a64699f78704e8ce638b3 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> Date: Thu, 11 Dec 2014 17:57:14 +0100 Subject: [PATCH 5/5] Fix a parse error in creating additional folders for user mailboxes --- pykolab/imap/__init__.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py index cf6ff07..4acc58f 100644 --- a/pykolab/imap/__init__.py +++ b/pykolab/imap/__init__.py @@ -554,9 +554,9 @@ class IMAP(object): return folder_name - def user_mailbox_create_additional_folders(self, folder, additional_folders): + def user_mailbox_create_additional_folders(self, user, additional_folders): log.debug( - _("Creating additional folders for user %s") % (folder), + _("Creating additional folders for user %s") % (user), level=8 ) @@ -565,6 +565,8 @@ class IMAP(object): admin_login = conf.get(backend, 'admin_login') admin_password = conf.get(backend, 'admin_password') + folder = 'user%s%s' % (self.get_separator(), user) + if self.imap_murder(): server = self.user_mailbox_server(folder) else: @@ -577,7 +579,7 @@ class IMAP(object): self.disconnect() self.connect(login=False, server=server) - self.login_plain(admin_login, admin_password, folder) + self.login_plain(admin_login, admin_password, user) (personal, other, shared) = self.namespaces() success = True except Exception, errmsg: @@ -635,12 +637,12 @@ class IMAP(object): "%s" % (additional_folders[additional_folder]["acls"][acl]) ) - if len(folder.split('@')) > 1: - localpart = folder.split('@')[0] - domain = folder.split('@')[1] + if len(user.split('@')) > 1: + localpart = user.split('@')[0] + domain = user.split('@')[1] domain_suffix = "@%s" % (domain) else: - localpart = folder + localpart = user domain = None domain_suffix = "" @@ -684,11 +686,11 @@ class IMAP(object): _subscribe = False if _subscribe: - log.debug(_("Subscribing %s to folder %s") % (folder, _folder), level=8) + log.debug(_("Subscribing %s to folder %s") % (user, _folder), level=8) try: self.subscribe(_folder) except Exception, errmsg: - log.error(_("Subscribing %s to folder %s failed: %r") % (folder, _folder, errmsg)) + log.error(_("Subscribing %s to folder %s failed: %r") % (user, _folder, errmsg)) self.logout() self.connect(domain=self.domain) -- 1.9.3
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.