[to #42322933] specify ast scan file open encoding

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10090797

    * [to #42322933] specify ast scan file open encoding
This commit is contained in:
yingda.chen
2022-09-13 18:04:01 +08:00
parent c35f8cb42b
commit e9eeb05bcd

View File

@@ -394,7 +394,7 @@ class AstScaning(object):
def generate_ast(self, file):
self._refresh()
with open(file, 'r') as code:
with open(file, 'r', encoding='utf8') as code:
data = code.readlines()
data = ''.join(data)