Comment 4 for bug 1122464

Revision history for this message
hasufell (jd-o) wrote :

reverting this change

@@ -378,7 +390,13 @@

     try:
         with open(file, 'rb') as f:
- tree = ast.parse(f.read().decode('UTF-8'), file)
+ # send binary blob for python2, otherwise sending an unicode object with
+ # "encoding" directive makes ast triggering an exception in python2
+ if(sys.version_info[0] < 3):
+ file_content = f.read()
+ else:
+ file_content = f.read().decode('UTF-8')
+ tree = ast.parse(file_content, file)

which occurs in python-distutils-extra-2.34 first seems to fix the issue