Skip to content

Commit 22f36ee

Browse files
committed
Cleanup filecmp: starting from 3.3 os.error is alias for OSError
1 parent 6b2cbeb commit 22f36ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/filecmp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def phase2(self): # Distinguish files, directories, funnies
147147
ok = 1
148148
try:
149149
a_stat = os.stat(a_path)
150-
except os.error as why:
150+
except OSError as why:
151151
# print('Can\'t stat', a_path, ':', why.args[1])
152152
ok = 0
153153
try:
154154
b_stat = os.stat(b_path)
155-
except os.error as why:
155+
except OSError as why:
156156
# print('Can\'t stat', b_path, ':', why.args[1])
157157
ok = 0
158158

@@ -268,7 +268,7 @@ def cmpfiles(a, b, common, shallow=True):
268268
def _cmp(a, b, sh, abs=abs, cmp=cmp):
269269
try:
270270
return not abs(cmp(a, b, sh))
271-
except os.error:
271+
except OSError:
272272
return 2
273273

274274

0 commit comments

Comments
 (0)