Commit 22ad035d authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Suppress warnings in scripts

parent 61e58bc4
......@@ -15,12 +15,24 @@ import itertools as it
import sys
import argparse
import textwrap
import warnings
import logging
import numpy as np
import fsl.data.atlases as fslatlases
import fsl.version as fslversion
import fsl.data.image as fslimage
# if h5py <= 2.7.1 is installed,
# it will be imported via nibabel,
# and will cause a numpy warning
# to be emitted.
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=FutureWarning)
import fsl.data.image as fslimage
# If wx is not present, then fsl.utils.platform
# will complain that it is not present.
logging.getLogger('fsl.utils.platform').setLevel(logging.ERROR)
import fsl.data.atlases as fslatlases # noqa
import fsl.version as fslversion # noqa
log = logging.getLogger(__name__)
......
......@@ -16,9 +16,15 @@ from __future__ import print_function
import os.path as op
import sys
import warnings
import fsl.utils.path as fslpath
import fsl.utils.imcp as imcp
import fsl.data.image as fslimage
# See atlasq.py for explanation
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=FutureWarning)
import fsl.utils.imcp as imcp
import fsl.data.image as fslimage
usage = """Usage:
......
......@@ -12,8 +12,13 @@ NIFTI/ANALYZE image files.
from __future__ import print_function
import sys
import warnings
import fsl.utils.path as fslpath
import fsl.data.image as fslimage
# See atlasq.py for explanation
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=FutureWarning)
import fsl.data.image as fslimage
usage = """
......
......@@ -17,9 +17,15 @@ from __future__ import print_function
import os.path as op
import sys
import warnings
import fsl.utils.path as fslpath
import fsl.utils.imcp as imcp
import fsl.data.image as fslimage
# See atlasq.py for explanation
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=FutureWarning)
import fsl.utils.imcp as imcp
import fsl.data.image as fslimage
usage = """Usage:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment