From 0e34a376d4440655b7d4cb05ed9bca70f7d2ec56 Mon Sep 17 00:00:00 2001 From: hack Date: Mon, 30 Jan 2012 21:52:50 +0000 Subject: Logic was added to wcscorr.update_wcscorr() to prevent it from trying to update WCSCORR tables when the input image is a simple FITS file. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@14693 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/wcsutil/wcscorr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/stwcs/wcsutil') diff --git a/lib/stwcs/wcsutil/wcscorr.py b/lib/stwcs/wcsutil/wcscorr.py index 7dd8578..0bc7bc2 100644 --- a/lib/stwcs/wcsutil/wcscorr.py +++ b/lib/stwcs/wcsutil/wcscorr.py @@ -271,10 +271,13 @@ def update_wcscorr(dest, source=None, extname='SCI', wcs_id=None, active=True): if source is None: source = dest + if extname == 'PRIMARY': + return + numext = fileutil.countExtn(source, extname) if numext == 0: raise ValueError('No %s extensions found in the source HDU list.' - % extname) + % extname) # Initialize the WCSCORR table extension in dest if not already present init_wcscorr(dest) -- cgit