From a79d1beb42cc6ef20cd6936cccc45a08fd9a8853 Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Thu, 14 Nov 2024 13:26:23 -0500 Subject: [PATCH] Fix test failure --- gwcs/converters/wcs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gwcs/converters/wcs.py b/gwcs/converters/wcs.py index bfaab5bd..313d6d10 100644 --- a/gwcs/converters/wcs.py +++ b/gwcs/converters/wcs.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- import warnings +from contextlib import suppress from asdf.extension import Converter @@ -22,7 +23,7 @@ def from_yaml_tree(self, node, tag, ctx): # Ignore the warning about the bounding box order for data read from a # file. This is causing issues with files from MAST. - with warnings.catch_warnings(): + with suppress(AttributeError), warnings.catch_warnings(): warnings.filterwarnings('ignore', category=GwcsBoundingBoxWarning) _ = gwcsobj.bounding_box