diff options
Diffstat (limited to 'plugins/python')
-rw-r--r-- | plugins/python/python.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/python/python.py b/plugins/python/python.py index 0420a4e2..7a794784 100644 --- a/plugins/python/python.py +++ b/plugins/python/python.py @@ -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) |