[Python-checkins] cpython (2.7): Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
terry.reedy
python-checkins at python.org
Thu May 9 05:43:04 CEST 2013
http://hg.python.org/cpython/rev/1823cf6e1084
changeset: 83691:1823cf6e1084
branch: 2.7
parent: 83689:8952fa2c475f
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Wed May 08 23:42:41 2013 -0400
summary:
Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
Patch by Till Maas.
files:
Lib/filecmp.py | 2 +-
Misc/ACKS | 1 +
Misc/NEWS | 3 +++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -268,7 +268,7 @@
def _cmp(a, b, sh, abs=abs, cmp=cmp):
try:
return not abs(cmp(a, b, sh))
- except os.error:
+ except (os.error, IOError):
return 2
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -626,6 +626,7 @@
Jim Lynch
Mikael Lyngvig
Martin von Löwis
+Till Maas
Jeff MacDonald
John Machin
Andrew I MacIntyre
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,6 +26,9 @@
Library
-------
+- Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
+ Patch by Till Maas.
+
- Issue #17926: Fix dbm.__contains__ on 64-bit big-endian machines.
- Issue #17918: When using SSLSocket.accept(), if the SSL handshake failed
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list