From 349e090663bf73f21d8e10d3e7b83ca070981fd2 Mon Sep 17 00:00:00 2001 From: embray Date: Mon, 11 Jul 2011 15:33:02 +0000 Subject: Fixes something I broke in r13329. Didn't realize that siphdr was the CardList and not a Header. Another example of the Header API being not great... git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13332 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/wcsutil/headerlet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/stwcs/wcsutil/headerlet.py') diff --git a/lib/stwcs/wcsutil/headerlet.py b/lib/stwcs/wcsutil/headerlet.py index 2888e28..b1b873b 100644 --- a/lib/stwcs/wcsutil/headerlet.py +++ b/lib/stwcs/wcsutil/headerlet.py @@ -496,10 +496,10 @@ class Headerlet(pyfits.HDUList): wind = len(fhdr) self.hdr_logger.debug("Inserting WCS keywords at index %s" % wind) for k in siphdr: - if k not in ['XTENSION', 'BITPIX', 'NAXIS', 'PCOUNT', - 'GCOUNT','EXTNAME', 'EXTVER', 'ORIGIN', - 'INHERIT', 'DATE', 'IRAF-TLM']: - fhdr.insert(wind, siphdr[k]) + if k.key not in ['XTENSION', 'BITPIX', 'NAXIS', 'PCOUNT', + 'GCOUNT','EXTNAME', 'EXTVER', 'ORIGIN', + 'INHERIT', 'DATE', 'IRAF-TLM']: + fhdr.insert(wind, k) else: pass -- cgit