From 1016aa1d4c431e78adff87f725976211f1cd119b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 11 Jun 2017 20:06:48 +0800 Subject: astro/fits/fitscube.py: Fix a astropy.io.fits write warning --- astro/fits/fitscube.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/astro/fits/fitscube.py b/astro/fits/fitscube.py index f9a96e1..8effc75 100755 --- a/astro/fits/fitscube.py +++ b/astro/fits/fitscube.py @@ -68,7 +68,10 @@ class FITSCube: def write(self, outfile, clobber): hdu = fits.PrimaryHDU(data=self.data, header=self.header) - hdu.writeto(outfile, clobber=clobber) + try: + hdu.writeto(outfile, overwrite=clobber) + except TypeError: + hdu.writeto(outfile, clobber=clobber) @property def width(self): -- cgit v1.2.2