Skip to content
Permalink
Browse files

[processing] Avoid more deprecation warnings from external libraries

  • Loading branch information
nyalldawson committed Mar 4, 2019
1 parent c1cc2b5 commit 2ff0d5919ce8c4d069757105f8133f23198cfd84
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 2ff0d59

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