Browse code

replace deprecated IOError with OSError, see https://www.python.org/dev/peps/pep-3151/#step-1-coalesce-exception-types

Hanno Böck authored on09/06/2020 19:46:07
Showing1 changed files
... ...
@@ -123,7 +123,7 @@ for fdir in opts.dirs:
123 123
                         mfile = os.path.join(root, filename)
124 124
                         try:
125 125
                             file = open(mfile, errors='replace')
126
-                        except IOError:
126
+                        except OSError:
127 127
                             continue
128 128
                         filestr = file.read()
129 129
                         file.close()