fix addons load in python2
This commit is contained in:
parent
2dd7636134
commit
6da8f97e37
@ -146,8 +146,8 @@ class Plugin:
|
|||||||
def loadfile(self, filename):
|
def loadfile(self, filename):
|
||||||
try:
|
try:
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
with open(filename, encoding='utf-8') as f:
|
with open(filename, 'rb') as f:
|
||||||
data = f.read()
|
data = f.read().decode('utf-8')
|
||||||
compiled = compile_file(data, filename)
|
compiled = compile_file(data, filename)
|
||||||
exec(compiled, self.globals)
|
exec(compiled, self.globals)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user