fix addons load in python2

This commit is contained in:
DjLegolas 2022-05-07 19:16:11 +03:00 committed by Patrick
parent 2dd7636134
commit 6da8f97e37

View File

@ -146,8 +146,8 @@ class Plugin:
def loadfile(self, filename):
try:
self.filename = filename
with open(filename, encoding='utf-8') as f:
data = f.read()
with open(filename, 'rb') as f:
data = f.read().decode('utf-8')
compiled = compile_file(data, filename)
exec(compiled, self.globals)