Issue #16706: get rid of os.error
diff --git a/Lib/compileall.py b/Lib/compileall.py
index fd22fc3c..a47e84f 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -38,7 +38,7 @@
         print('Listing {!r}...'.format(dir))
     try:
         names = os.listdir(dir)
-    except os.error:
+    except OSError:
         print("Can't list {!r}".format(dir))
         names = []
     names.sort()