This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joebauer
Recipients joebauer
Date 2012-02-04.12:04:56
SpamBayes Score 2.4092853e-07
Marked as misclassified No
Message-id <1328357098.01.0.78801274991.issue13940@psf.upfronthosting.co.za>
In-reply-to
Content
imaplib does not qupote mailbox names when it's sending it's query to the server in response to a status request, for example. This will lead to very strange errors if mailboxes are accessed which contain spaces:

i.e.

connection.status("mailbox name", "(MESSAGES)")

will return

  File "/home/joe/test/imaplib.py", line 920, in _command_complete
    raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.error: STATUS command error: BAD [b'Error in IMAP command STATUS: Status items must be list.']

which indicates that the error is within the actual flag list. It is not, however:

connection.status("\"mailbox name\"", "(MESSAGES)")

works as expected. This may arguably be or not be a bug -- however it is REALLY confusing to the user. Maybe at least a note should be included somewhere that -- just to be safe -- mailbox names should be quoted.

All the best,
Joe
History
Date User Action Args
2012-02-04 12:04:58joebauersetrecipients: + joebauer
2012-02-04 12:04:58joebauersetmessageid: <1328357098.01.0.78801274991.issue13940@psf.upfronthosting.co.za>
2012-02-04 12:04:57joebauerlinkissue13940 messages
2012-02-04 12:04:56joebauercreate