From: Menno Smits Date: Thu, 16 Apr 2009 19:06:27 +0000 (+0100) Subject: documented remaining issues with folder handling X-Git-Tag: 0.7~96^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a8c2c411bd0d77a8bc5453e23d0f3136eff704b2;p=imapclient.git documented remaining issues with folder handling --- diff --git a/TODO b/TODO index 287ecc9..e63b881 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,6 @@ - transparent folder escaping + - re_folder currently fails if there's strange chars in the folder name + - write a unit test for this - more testing - gmail - cyrus diff --git a/imapclient/imapclient.py b/imapclient/imapclient.py index 52cc513..db0a0b6 100644 --- a/imapclient/imapclient.py +++ b/imapclient/imapclient.py @@ -163,9 +163,17 @@ class IMAPClient(object): folders = [] for line in data: + folder_text = None + #XXX write a unit test for this bug + #XXX can the FetchParser code be used here instead? + #if isinstance(line, tuple): + #folder_text = line[-1] + #else: m = self.re_folder.match(line) if m: - folders.append(self._decode_folder_name(m.group(1))) + folder_text = m.group(1) + if folder_text is not None: + folders.append(self._decode_folder_name(folder_text)) return folders