Commit 101b2e32 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix unicode issue with python 2.7

parent fc0eb37f
......@@ -60,7 +60,10 @@ while len(incs) > 0:
if os.path.isdir(inc):
incs += glob.glob(inc + "/*")
else:
headers_hash = hashlib.md5((headers_hash + open(inc).read()).encode('utf-8')).hexdigest()
try:
headers_hash = hashlib.md5((headers_hash + open(inc).read()).encode('utf-8')).hexdigest()
except UnicodeDecodeError:
headers_hash = hashlib.md5(headers_hash + open(inc).read()).hexdigest()
# property map types
props = """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment