mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Cleanup filecmp: starting from 3.3 os.error is alias for OSError
This commit is contained in:
parent
6b2cbeba58
commit
22f36eed4d
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue