Roy Hyunjin Han added the comment:
The behavior may not be surprising from a technical perspective, but it is
unintuitive.
I think exceptions inside a with statement should trigger a traceback, unless
you are saying that it is the responsibility of the author to catch and raise
the exception
New submission from Roy Hyunjin Han:
Exceptions and arguments disappear when using argparse inside a "with"
statement. The behavior was confusing and frustrating because I could not
pinpoint why certain arguments were missing or unrecognized.
Unhandled exceptions inside the with
Roy Hyunjin Han added the comment:
Yes, I think closing this issue is reasonable. If the error reappears, we can
just reopen it.
--
___
Python tracker
<http://bugs.python.org/issue1
Roy Hyunjin Han added the comment:
Hi Lita,
I no longer have access to a Domino server.
I'm not sure whether there are enough users trying to access Domino with
imaplib for this to warrant investigation.
RHH
--
___
Python tracker
Roy Hyunjin Han added the comment:
Is imaplib choking on the IBM-specific X-MIMETrack header? Is Lotus Notes
properly formatting the multi-line headers? Can RFC822 headers contain the
PIPE | symbol?
--
___
Python tracker
<http://bugs.python.
Roy Hyunjin Han added the comment:
> This is fixed by the fix to issue 1079, but we have decided that fix can't be
> backported because it is a behavior change that might break existing working
> programs.
Thanks for this update.
--
Roy Hyunjin Han added the comment:
2010/11/30 R. David Murray :
> Out of curiosity, which email program is it that is producing these invalid
> headers?
I lost the headers for the original email, so I don't know which email
program created the invalid headers.
On searching for me
Roy Hyunjin Han added the comment:
The following code seems to solve the first case just as well. It seems that
it is a problem of missing whitespace.
email.header.decode_header('=?UTF-8?B?MjAxMSBBVVRNIENBTEwgZm9yIE5PTUlO?==?UTF-8?B?QVRJT05TIG9mIFZQIGZvciBNZW1iZXJz?==?UTF-8?B?aGlw?=
Roy Hyunjin Han added the comment:
Improved workaround to handle another degenerate case where the encoded string
is in between non-encoded strings.
import re
import email.header
pattern_ecre = re.compile(r'((=\?.*?\?[qb]\?).*\?=)', re.VERBOSE |
re.IGNORECASE | re.MULTI
Roy Hyunjin Han added the comment:
Currently using the following workaround.
import re
import email.header
def decodeSafely(x):
match = re.search('(=\?.*?\?B\?)', x)
if not match:
return x
encoding = match.group(1)
return email.header.decode_he
10 matches
Mail list logo