]> granicus.if.org Git - python/commitdiff
Cleanup filecmp: starting from 3.3 os.error is alias for OSError
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Fri, 14 Dec 2012 16:02:27 +0000 (18:02 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Fri, 14 Dec 2012 16:02:27 +0000 (18:02 +0200)
Lib/filecmp.py

index f5cea1de6ff02639711f9c6e466c6f4ba6d086ca..5bbd0e811f4bb48eae4c170f3f5c3285c30b5324 100644 (file)
@@ -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