From 45c5a25f4793c8df141ebdb07c5bbd2ff424a598 Mon Sep 17 00:00:00 2001 From: dencheva Date: Wed, 15 Sep 2010 20:33:51 +0000 Subject: Corrected a problem with input header created with the last checkin. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10316 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/utils.py') diff --git a/lib/utils.py b/lib/utils.py index 7590b42..6f63db0 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -115,8 +115,8 @@ def archiveWCS(fname, ext, wcskey, wcsname=" ", clobber=False): print 'Or use utils.restoreWCS a specific WCS to the primary WCS.' print 'WCS was NOT archived.' return - if (wcskey not in available_wcskeys(f[ext].header)) and clobber==False: - print 'wcskey %s is already used in this header.' % wcskey + if (wcskey not in available_wcskeys(pyfits.getheader(fname, ext=ext))) and clobber==False: + print 'Wcskey %s is already used in this header.' % wcskey print 'Use "utils.next_wcskey" to obtain a valid wcskey' print 'or use "clobber=True" to overwrite the values.' return -- cgit