Skip to content

Commit 3106973

Browse files
committed
Switching to RachisWarning
1 parent b5e9b00 commit 3106973

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

q2cli/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from q2cli.click.command import BaseCommandMixin
1616
from q2cli.core.config import CONFIG
17-
from q2cli.util import filter_QIIME2_warnings
17+
from q2cli.util import filter_rachis_warnings
1818

1919

2020
class RootCommand(BaseCommandMixin, click.MultiCommand):
@@ -549,7 +549,7 @@ def __call__(self, **kwargs):
549549
cleanup_logfile = False
550550
try:
551551
with (qiime2.util.redirected_stdio(stdout=log, stderr=log),
552-
filter_QIIME2_warnings()):
552+
filter_rachis_warnings()):
553553
if parallel:
554554
from qiime2.sdk.parallel_config import \
555555
(load_config_from_file, ParallelConfig)

q2cli/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,10 @@ def get_default_recycle_pool(plugin_action):
536536

537537

538538
@contextlib.contextmanager
539-
def filter_QIIME2_warnings():
539+
def filter_rachis_warnings():
540540
import sys
541541
import warnings
542-
from qiime2.core.exceptions import QIIME2Warning
542+
from qiime2.core.exceptions import RachisWarning
543543

544544
original_showwarning = warnings.showwarning
545545

@@ -553,7 +553,7 @@ def save_warnings(
553553
warnings of category QIIME2Warning.
554554
"""
555555

556-
if issubclass(category, QIIME2Warning):
556+
if issubclass(category, RachisWarning):
557557
captured_warnings.append((str(message), filename, lineno))
558558
else:
559559
original_showwarning(

0 commit comments

Comments
 (0)