Mercurial > cgi-bin > hgweb.cgi > tincan
diff tincan.py @ 68:61667621e19d draft
Work around bug in py_compile.
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 15 Jul 2019 00:15:25 -0700 |
parents | b5e72129ef72 |
children | c168aad7a731 |
line wrap: on
line diff
--- a/tincan.py Sun Jul 14 14:47:33 2019 -0700 +++ b/tincan.py Mon Jul 15 00:15:25 2019 -0700 @@ -706,7 +706,10 @@ if pyctime < pytime: py_compile.compile(pypath, cfile=pycpath, doraise=True) except py_compile.PyCompileError as e: - raise TinCanError(str(e)) from e + msg = str(e) + if pypath not in msg: + msg = pypath + ": " + msg + raise TinCanError(msg) from e except Exception as e: raise TinCanError("{0}: {1!s}".format(pypath, e)) from e try: