Mercurial > hg-stable
changeset 27331:35e69407b1ac
contrib: ignore empty files in check-py3-compat.py
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 12 Dec 2015 13:27:31 -0500 |
parents | 6fbf1159a85a |
children | 04f346b8768f |
files | contrib/check-py3-compat.py tests/test-check-py3-compat.t |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-py3-compat.py Sat Dec 12 13:23:29 2015 -0500 +++ b/contrib/check-py3-compat.py Sat Dec 12 13:27:31 2015 -0500 @@ -17,6 +17,10 @@ with open(f, 'rb') as fh: content = fh.read() + # Ignore empty files. + if not content.strip(): + return + root = ast.parse(content) futures = set() haveprint = False
--- a/tests/test-check-py3-compat.t Sat Dec 12 13:23:29 2015 -0500 +++ b/tests/test-check-py3-compat.t Sat Dec 12 13:27:31 2015 -0500 @@ -15,7 +15,6 @@ contrib/fixpax.py requires print_function contrib/hgclient.py not using absolute_import contrib/hgclient.py requires print_function - contrib/hgfixes/__init__.py not using absolute_import contrib/hgfixes/fix_bytes.py not using absolute_import contrib/hgfixes/fix_bytesmod.py not using absolute_import contrib/hgfixes/fix_leftover_imports.py not using absolute_import @@ -125,7 +124,6 @@ mercurial/mdiff.py not using absolute_import mercurial/obsolete.py not using absolute_import mercurial/patch.py not using absolute_import - mercurial/pure/__init__.py not using absolute_import mercurial/pure/base85.py not using absolute_import mercurial/pure/bdiff.py not using absolute_import mercurial/pure/diffhelpers.py not using absolute_import