Skip to content

Commit

Permalink
[processing] Silence warnings thrown from within plotly on import
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 19, 2018
1 parent 16ac437 commit 8d6ce61
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@
__revision__ = '$Format:%H$'

import os
import warnings

try:
import plotly # NOQA
hasPlotly = True
# importing plotly throws Python warnings from within the library - filter these out
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=ResourceWarning)
import plotly # NOQA
hasPlotly = True
except:
hasPlotly = False

Expand Down

0 comments on commit 8d6ce61

Please sign in to comment.