[Patches] [ python-Patches-1605192 ] Make Imap Error more helpful (original) (raw)
SourceForge.net noreply at sourceforge.net
Wed Dec 27 18:52:23 CET 2006
- Previous message: [Patches] [ python-Patches-1504073 ] Patch for 1496501 tarfile opener order
- Next message: [Patches] [ python-Patches-1607548 ] Optional Argument Syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Patches item #1605192, was opened at 2006-11-29 05:52 Message generated for change (Comment added) made by mark-roberts You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1605192&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: Library (Lib) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Thomas Guettler (guettli) Assigned to: Nobody/Anonymous (nobody) Summary: Make Imap Error more helpful
Initial Comment: Hi,
In my app I got this error:
imaplib.error: command SEARCH illegal in state AUTH.
but I did successfully login. After reading the source of imaplib.py I realized that this was meant:
imaplib.error: command SEARCH illegal in state AUTH. Allowed after: SELECTED
Attached is a small patch to make the error message more helpful.
Comment By: Mark Roberts (mark-roberts) Date: 2006-12-27 11:52
Message: Logged In: YES user_id=1591633 Originator: NO
The patch looks great (Not as though I have a lot of say to say so..), but it seems incongruous that you say "allowed after" when it might seem more explicit to say "Allowed in states", like so: "Allowed in states: %s" % (", ".join(Commands[command])
Otherwise, I'm all for more explicit error messages!
- Mark
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1605192&group_id=5470
- Previous message: [Patches] [ python-Patches-1504073 ] Patch for 1496501 tarfile opener order
- Next message: [Patches] [ python-Patches-1607548 ] Optional Argument Syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]