Skip to content
Permalink
Browse files

[processing] Avoid more deprecation warnings from external libraries

(cherry picked from commit 2ff0d59)
  • Loading branch information
nyalldawson committed Mar 4, 2019
1 parent ee17342 commit 62a9d2bab1d20c326fee4a6dfe1785a98469cb7b
Showing with 11 additions and 5 deletions.
  1. +11 −5 python/plugins/processing/algs/help/__init__.py
@@ -25,7 +25,11 @@

import os
import codecs
import yaml
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
import yaml

from qgis.core import QgsSettings, Qgis
from qgis.PyQt.QtCore import QLocale, QCoreApplication

@@ -37,10 +41,12 @@ def loadShortHelp():
if f.endswith("yaml"):
filename = os.path.join(path, f)
with codecs.open(filename, encoding='utf-8') as stream:
for k, v in yaml.load(stream).items():
if v is None:
continue
h[k] = QCoreApplication.translate("{}Algorithm".format(f[:-5].upper()), v)
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
for k, v in yaml.load(stream).items():
if v is None:
continue
h[k] = QCoreApplication.translate("{}Algorithm".format(f[:-5].upper()), v)

version = ".".join(Qgis.QGIS_VERSION.split(".")[0:2])
overrideLocale = QgsSettings().value('locale/overrideFlag', False, bool)

0 comments on commit 62a9d2b

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