#18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch
changing IOError to OSError (#16715).
diff --git a/Lib/idlelib/GrepDialog.py b/Lib/idlelib/GrepDialog.py
index 27fcc33..46d6304 100644
--- a/Lib/idlelib/GrepDialog.py
+++ b/Lib/idlelib/GrepDialog.py
@@ -82,7 +82,7 @@
         for fn in list:
             try:
                 f = open(fn, errors='replace')
-            except IOError as msg:
+            except OSError as msg:
                 print(msg)
                 continue
             lineno = 0