[Patches] imaplib.py patch
Piers Lauder
piers@cs.su.oz.au
Thu, 24 Feb 2000 12:18:50 +1100
--129.78.10.43.126.5360.951355725.350.14600
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi!
The following patch to imaplib.py is wrt. the current Python CVS tree
(as of 1/2 hour ago) and was generated via "diff -c".
Standard disclaimer:
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims"). To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.
I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation. I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
Reason for patch:
A change in my last patch could, under certain circumstances,
cause a loop if the connection to the server dropped while
waiting for a command completion. I've changed the code to
re-raise the error after possible debugging output.
Piers Lauder.
--129.78.10.43.126.5360.951355725.350.14600
Content-Type: application/octet-stream; name=imaplib-diff
Content-Transfer-Encoding: 7bit
*** dist/src/Lib/imaplib.py Thu Feb 24 11:03:13 2000
--- /usr/staff/piers/lib/html/python/imaplib.py Thu Feb 24 10:54:49 2000
***************
*** 15,21 ****
Time2Internaldate
"""
! __version__ = "2.30"
import binascii, re, socket, string, time, random, sys
--- 15,21 ----
Time2Internaldate
"""
! __version__ = "2.32"
import binascii, re, socket, string, time, random, sys
***************
*** 755,763 ****
return result
# Some have reported "unexpected response" exceptions.
! # (Isn't this non-IMAP4-compliant behaviour?
! # Please mail me details printed below!)
! # Anyway, ignore them here.
try:
self._get_response()
--- 755,763 ----
return result
# Some have reported "unexpected response" exceptions.
! # Note that ignoring them here causes loops.
! # Instead, send me details of the unexpected response and
! # I'll update the code in `_get_response()'.
try:
self._get_response()
***************
*** 764,771 ****
except self.abort, val:
if __debug__:
if self.debug >= 1:
- _mesg('abort exception ignored: %s' % val)
print_log()
def _get_line(self):
--- 764,771 ----
except self.abort, val:
if __debug__:
if self.debug >= 1:
print_log()
+ raise
def _get_line(self):
--129.78.10.43.126.5360.951355725.350.14600--