Bugs item #1277098, was opened at 2005-08-31 15:52 Message generated for change (Comment added) made by jerub You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1277098&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.3 Status: Open Resolution: None Priority: 5 Submitted By: Stephen Thorne (jerub) >Assigned to: Piers Lauder (pierslauder) Summary: imaplib Imap.select() uses comparison to 'None' for boolean Initial Comment: The imap class's method for selecting a mailbox in read only mode is subtly broken. Calling i.select('INBOX', readonly=0) will cause the imap library to open the mailbox in EXAMINE mode, not SELECT. def select(self, mailbox='INBOX', readonly=None): if readonly is not None: name = 'EXAMINE' else: name = 'SELECT' So passing what seems to be a boolean option into the function causes unexpected circumstances in client code. Recommend that the comparison be changed to 'if readonly:'. I have verified this code exists in python2.3 and in python cvs head. ---------------------------------------------------------------------- >Comment By: Stephen Thorne (jerub) Date: 2005-08-31 15:54 Message: Logged In: YES user_id=100823 assigned to pierslauder as per abaxter's request. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1277098&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com