From 22f36eed4d3c01ba101ab77c4df84fae126fc1ac Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Fri, 14 Dec 2012 18:02:27 +0200 Subject: Cleanup filecmp: starting from 3.3 os.error is alias for OSError --- Lib/filecmp.py | 6 +++--- 1 file 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 -- cgit v0.12