summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-14 16:02:27 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-14 16:02:27 (GMT)
commit22f36eed4d3c01ba101ab77c4df84fae126fc1ac (patch)
tree4bdc8315d2f82db0aa0d663ae5edec5303960d45
parent6b2cbeba58aeb0755bdefd02fb51a80ec66d6144 (diff)
downloadcpython-22f36eed4d3c01ba101ab77c4df84fae126fc1ac.zip
cpython-22f36eed4d3c01ba101ab77c4df84fae126fc1ac.tar.gz
cpython-22f36eed4d3c01ba101ab77c4df84fae126fc1ac.tar.bz2
Cleanup filecmp: starting from 3.3 os.error is alias for OSError
-rw-r--r--Lib/filecmp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index f5cea1d..5bbd0e8 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -147,12 +147,12 @@ class dircmp:
ok = 1
try:
a_stat = os.stat(a_path)
- except os.error as why:
+ except OSError as why:
# print('Can\'t stat', a_path, ':', why.args[1])
ok = 0
try:
b_stat = os.stat(b_path)
- except os.error as why:
+ except OSError as why:
# print('Can\'t stat', b_path, ':', why.args[1])
ok = 0
@@ -268,7 +268,7 @@ def cmpfiles(a, b, common, shallow=True):
def _cmp(a, b, sh, abs=abs, cmp=cmp):
try:
return not abs(cmp(a, b, sh))
- except os.error:
+ except OSError:
return 2