* New methods for interacting the Gmail's label API: get_gmail_labels,
add_gmail_labels, set_gmail_labels, remove_gmail_labels. Thanks to
- Brian Neal for the patch.
+ Brian Neal for the patches.
+
+Minor Features
+--------------
+* Don't traceback when an IMAP server returns a all-digit folder name
+ without quotes. Thanks to Rhett Garber for the bug report. (#107)
=======
0.8.1
Mark Eichin (eichin _AT_ thok.org)
Fergal Daly (fergal _AT_ esatclear.ie)
Bob Yexley (bob _AT_ yexley.net)
+Rhett Garber
The project was partially developed while the author was working at NetBox Blue
])
def _decode_folder_name(self, name):
+ if isinstance(name, int):
+ # Some IMAP implementations return integer folder names
+ # with quotes. These get parsed to ints so convert them
+ # back to strings.
+ return str(name)
if self.folder_encode:
return imap_utf7.decode(name)
return name
(['\\HasNoChildren'], '/', 'B'),
(['\\HasNoChildren'], '/', 'C')])
+ def test_unquoted_numeric_folder_name(self):
+ # Some IMAP implementations do this
+ folders = self.client._proc_folder_list(['(\\HasNoChildren) "/" 123'])
+ self.assertEqual(folders, [(['\\HasNoChildren'], '/', '123')])
def test_mixed(self):
folders = self.client._proc_folder_list(['(\\HasNoChildren) "/" Alpha',