Avoid deprecation warning from third party module

Fixes #31391
This commit is contained in:
Nyall Dawson 2019-08-25 09:32:04 +10:00
parent 6af029d52e
commit 538946ad08

View File

@ -26,13 +26,17 @@
from gettext import gettext, ngettext
import logging
import warnings
import os
import codecs
import webbrowser
from xml.dom.minidom import parseString
import xml.etree.ElementTree as etree
from jinja2 import Environment, FileSystemLoader
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
from jinja2 import Environment, FileSystemLoader
from pygments import highlight
from pygments.lexers import XmlLexer
from pygments.formatters import HtmlFormatter