New submission from Johannes Bauer <[email protected]>:
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
----------
components: Library (Lib)
messages: 152612
nosy: joebauer
priority: normal
severity: normal
status: open
title: imaplib: Mailbox names are not quoted
type: behavior
versions: Python 3.1
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13940>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com