Skip to content

Commit 3409715

Browse files
committed
Specify fits warning filter to ignore VerifyWarning
1 parent c36b19a commit 3409715

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

astroquery/esasky/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ def query(self, query, *, output_file=None, output_format="votable", verbose=Fal
114114
commons.suppress_vo_warnings()
115115
warnings.filterwarnings("ignore", category=astropy.units.core.UnitsWarning)
116116
job = self._tap.launch_job(query=query, output_file=output_file, output_format=output_format,
117-
verbose=verbose, dump_to_file=output_file is not None)
117+
verbose=False, dump_to_file=output_file is not None)
118118
else:
119119
job = self._tap.launch_job(query=query, output_file=output_file, output_format=output_format,
120-
verbose=verbose, dump_to_file=output_file is not None)
120+
verbose=True, dump_to_file=output_file is not None)
121121
return job.get_results()
122122

123123
def get_tables(self, *, only_names=True, verbose=False, cache=True):
@@ -1551,7 +1551,7 @@ def _open_fits(self, path, verbose=False):
15511551
if verbose:
15521552
return fits.open(path)
15531553
with warnings.catch_warnings():
1554-
warnings.simplefilter("ignore")
1554+
warnings.filterwarnings("ignore", category=astropy.io.fits.verify.VerifyWarning)
15551555
return fits.open(path)
15561556

15571557
def _ends_with_fits_like_extentsion(self, name):

0 commit comments

Comments
 (0)