mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[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.
This commit is contained in:
parent
33120528d0
commit
3f50e8356e
@ -24,6 +24,7 @@ __copyright__ = '(C) 2016, Victor Olaya'
|
||||
__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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user