summaryrefslogtreecommitdiffstats
path: root/Lib/filecmp.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-05-09 03:42:41 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-05-09 03:42:41 (GMT)
commit673770c59d6b68c05aaa37cb3e45fb7f86aa7db3 (patch)
tree9c76616155ca568c2bb4cf6597b58a2dcaebb6f7 /Lib/filecmp.py
parentdb03e6b842011dfb1a419a23e1fbc8732fd7763f (diff)
downloadcpython-673770c59d6b68c05aaa37cb3e45fb7f86aa7db3.zip
cpython-673770c59d6b68c05aaa37cb3e45fb7f86aa7db3.tar.gz
cpython-673770c59d6b68c05aaa37cb3e45fb7f86aa7db3.tar.bz2
Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
Patch by Till Maas.
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r--Lib/filecmp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index 4728317..3a79381 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -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