Fix --emap output when the error is not in the main file

This commit is contained in:
Sei Lisa 2019-02-04 17:51:15 +01:00
parent 68c8726a64
commit 8cfcdd090a

View file

@ -71,10 +71,9 @@ class EParse(Exception):
def __init__(self, parser, msg):
self.errorpos = parser.errorpos
self.lno, self.cno, self.fname = GetErrLineCol(parser)
if parser.emap:
filename = self.fname
if parser.emap and filename == '<stdin>':
filename = parser.filename
else:
filename = self.fname
filename = (filename.decode('utf8', 'replace')
.replace(u'\\', u'\\\\')