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

Hanno Böck commited on 2020-06-09 19:46:07
Zeige 1 geänderte Dateien mit 1 Einfügungen und 1 Löschungen.

... ...
@@ -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()
130 130