Kaydet (Commit) 22f36eed authored tarafından Andrew Svetlov's avatar Andrew Svetlov

Cleanup filecmp: starting from 3.3 os.error is alias for OSError

üst 6b2cbeba
...@@ -147,12 +147,12 @@ class dircmp: ...@@ -147,12 +147,12 @@ class dircmp:
ok = 1 ok = 1
try: try:
a_stat = os.stat(a_path) a_stat = os.stat(a_path)
except os.error as why: except OSError as why:
# print('Can\'t stat', a_path, ':', why.args[1]) # print('Can\'t stat', a_path, ':', why.args[1])
ok = 0 ok = 0
try: try:
b_stat = os.stat(b_path) b_stat = os.stat(b_path)
except os.error as why: except OSError as why:
# print('Can\'t stat', b_path, ':', why.args[1]) # print('Can\'t stat', b_path, ':', why.args[1])
ok = 0 ok = 0
...@@ -268,7 +268,7 @@ def cmpfiles(a, b, common, shallow=True): ...@@ -268,7 +268,7 @@ def cmpfiles(a, b, common, shallow=True):
def _cmp(a, b, sh, abs=abs, cmp=cmp): def _cmp(a, b, sh, abs=abs, cmp=cmp):
try: try:
return not abs(cmp(a, b, sh)) return not abs(cmp(a, b, sh))
except os.error: except OSError:
return 2 return 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment