]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
authorTerry Jan Reedy <tjreedy@udel.edu>
Thu, 9 May 2013 03:42:41 +0000 (23:42 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Thu, 9 May 2013 03:42:41 +0000 (23:42 -0400)
Patch by Till Maas.

Lib/filecmp.py
Misc/ACKS
Misc/NEWS

index 4728317fce9934b5ef7cbe7fb36b740c6d12bce0..3a793819c642676beaed4d4ba8320300cb668af0 100644 (file)
@@ -268,7 +268,7 @@ def cmpfiles(a, b, common, shallow=1):
 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
 
 
index 660f52ce145996629856f0c7703871e4ac98ce4d..9e09abdf78acb21716ea191e1a1ead176fb2fcd2 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -626,6 +626,7 @@ Mark Lutz
 Jim Lynch
 Mikael Lyngvig
 Martin von Löwis
+Till Maas
 Jeff MacDonald
 John Machin
 Andrew I MacIntyre
index 867ebc558a01e404ee457d7f5a6f38cbeafe0812..6eea7de41820a3daea2aa5893b734e8168b6ee12 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,6 +26,9 @@ Core and Builtins
 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