Skip to content

Commit

Permalink
get_plugin_data: always use utf-8 encoding to read plugins
Browse files Browse the repository at this point in the history
Fixes build issues on systems using a different default encoding (e.g. Windows)
  • Loading branch information
phw committed May 18, 2022
1 parent 1f37589 commit 7c18fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion get_plugin_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
def get_plugin_data(filepath):
"""Parse a python file and return a dict with plugin metadata"""
data = {}
with open(filepath, 'rU') as plugin_file:
with open(filepath, 'rU', encoding='utf-8') as plugin_file:
source = plugin_file.read()
try:
root = ast.parse(source, filepath)
Expand Down

0 comments on commit 7c18fe7

Please sign in to comment.