diff contrib/check-py3-compat.py @ 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 40eb385f798f
children ae522fb493d4
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