Skip to content
Permalink
Browse files

[processing] Ensure reading of shortHelp yaml files as UTF-8

On macOS 10.11 with Py 3.5.2, .yaml files defaulted to ASCII and failed.
  • Loading branch information
dakcarto committed Nov 24, 2016
1 parent 3312052 commit 3f50e8356e0c52c811aecf9f81db470161f7a145
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/plugins/processing/algs/help/__init__.py
@@ -24,6 +24,7 @@
__revision__ = '$Format:%H$'

import os
import codecs
import yaml
from qgis.core import Qgis, QgsWkbTypes
from qgis.PyQt.QtCore import QSettings, QLocale
@@ -35,7 +36,7 @@ def loadShortHelp():
for f in os.listdir(path):
if f.endswith("yaml"):
filename = os.path.join(path, f)
with open(filename) as stream:
with codecs.open(filename, encoding='utf-8') as stream:
h.update(yaml.load(stream))
version = ".".join(Qgis.QGIS_VERSION.split(".")[0:2])
overrideLocale = QSettings().value('locale/overrideFlag', False, bool)

0 comments on commit 3f50e83

Please sign in to comment.
You can’t perform that action at this time.