summary refs log tree commit diff stats
path: root/plugins/python
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-04-11 21:54:33 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-04-21 20:23:35 -0300
commit5f137d2c81878c41aa3b893fb56b1116bc27bc78 (patch)
tree2d6eadb2474e2d7b234b3dda9efd7559335adce7 /plugins/python
parente2cfba040e26927b94a4e311a0a61365a81a41b1 (diff)
parent133f62806441a5db1156653aa1f077d2e8deeb34 (diff)
Merge upstream changes
Diffstat (limited to 'plugins/python')
-rw-r--r--plugins/python/meson.build1
-rw-r--r--plugins/python/python.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/python/meson.build b/plugins/python/meson.build
index 5fd7ec2f..1e9b41ad 100644
--- a/plugins/python/meson.build
+++ b/plugins/python/meson.build
@@ -28,4 +28,5 @@ shared_module('python', python3_source,
   install: true,
   install_dir: plugindir,
   name_prefix: '',
+  vs_module_defs: 'python.def'
 )
diff --git a/plugins/python/python.py b/plugins/python/python.py
index 7bd327e3..1adcde98 100644
--- a/plugins/python/python.py
+++ b/plugins/python/python.py
@@ -146,7 +146,7 @@ class Plugin:
     def loadfile(self, filename):
         try:
             self.filename = filename
-            with open(filename) as f:
+            with open(filename, encoding='utf-8') as f:
                 data = f.read()
             compiled = compile_file(data, filename)
             exec(compiled, self.globals)