Mercurial > public > mercurial-scm > hg
diff contrib/check-py3-compat.py @ 30093:68010ed1636d
py3: include module filename in check-py3-compat.py output
This change is intended to reduce noises in the next patch.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 09 Oct 2016 08:31:39 +0200 |
parents | 8faac092bb0c |
children | f701fffd21d8 |
line wrap: on
line diff
--- a/contrib/check-py3-compat.py Sat Oct 08 19:16:50 2016 +0200 +++ b/contrib/check-py3-compat.py Sun Oct 09 08:31:39 2016 +0200 @@ -58,7 +58,7 @@ name = f.replace('/', '.')[:-3].replace('.pure.', '.') with open(f, 'r') as fh: try: - imp.load_module(name, fh, '', ('py', 'r', imp.PY_SOURCE)) + imp.load_module(name, fh, f, ('py', 'r', imp.PY_SOURCE)) except Exception as e: exc_type, exc_value, tb = sys.exc_info() # We walk the stack and ignore frames from our custom importer,