Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 404b4e1

Browse files
author
Chris Brown
committed
Filter out warnings
Bravado spits out irrelevant warnings that we can't fix without handicapping our spec -- it requires a PR to Bravado
1 parent 06f11d0 commit 404b4e1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rasterfoundry/__init__.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Flag to indicate whether notebook support is available
2+
import os
3+
import warnings
4+
25
try:
36
import ipyleaflet # NOQA
47
NOTEBOOK_SUPPORT = True
58
except ImportError:
69
NOTEBOOK_SUPPORT = False
10+
11+
# Bravado spits out useless warnings by default, this is to silence them
12+
SHOW_WARNINGS = os.getenv("SHOW_WARNINGS_RF", False)
13+
14+
if not SHOW_WARNINGS:
15+
warnings.simplefilter("ignore")

0 commit comments

Comments
 (0)