# HG changeset patch # User David Barts # Date 1563174925 25200 # Node ID 61667621e19d208e38a22e784f00af244968a3d7 # Parent b5e72129ef72a6f15c30970d4ffb73ada4a86f82 Work around bug in py_compile. diff -r b5e72129ef72 -r 61667621e19d tincan.py --- 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: