We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0af708d commit bc63840Copy full SHA for bc63840
mypy/build.py
@@ -1778,8 +1778,11 @@ def parse_file(self) -> None:
1778
source = manager.fscache.read_with_python_encoding(path)
1779
self.source_hash = manager.fscache.md5(path)
1780
except IOError as ioerr:
1781
+ # ioerr.strerror differs for os.stat failures between Windows and
1782
+ # other systems, but os.strerror(ioerr.errno) does not, so we use that.
1783
raise CompileError([
- "mypy: can't read file '{}': {}".format(self.path, ioerr.strerror)])
1784
+ "mypy: can't read file '{}': {}".format(
1785
+ self.path, os.strerror(ioerr.errno))])
1786
except (UnicodeDecodeError, DecodeError) as decodeerr:
1787
1788
"mypy: can't decode file '{}': {}".format(self.path, str(decodeerr))])
0 commit comments