diff options
author | hack <hack@stsci.edu> | 2013-04-30 16:55:57 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2013-04-30 16:55:57 -0400 |
commit | 05d1dce7d577d746482a7cb33d83703ab0b6e769 (patch) | |
tree | a57ddf5997004e18a88ff632a6c3de2b42959c4c /lib/stwcs/updatewcs | |
parent | 7d529dbb88ec1e47611373638b72ca8d648246a3 (diff) | |
download | stwcs_hcf-05d1dce7d577d746482a7cb33d83703ab0b6e769.tar.gz |
This update removes all references to .has_key() method, including those for list and dict comprehension, but primarily to work with PyFITS 3.2.dev checked in on 29-Apr-2013. [Trac Ticket #1007]
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@24552 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/updatewcs')
-rw-r--r-- | lib/stwcs/updatewcs/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stwcs/updatewcs/__init__.py b/lib/stwcs/updatewcs/__init__.py index 37ab6e3..43f572b 100644 --- a/lib/stwcs/updatewcs/__init__.py +++ b/lib/stwcs/updatewcs/__init__.py @@ -126,7 +126,7 @@ def makecorr(fname, allowed_corr): for i in range(len(f))[1:]: extn = f[i] - if extn.header.has_key('extname'): + if 'extname' in extn.header: extname = extn.header['extname'].lower() if extname == 'sci': wcsutil.restoreWCS(f, ext=i, wcskey='O') @@ -167,12 +167,12 @@ def makecorr(fname, allowed_corr): for kw in kw2update: f[1].header.update(kw, kw2update[kw]) # Finally record the version of the software which updated the WCS - if f[0].header.has_key('HISTORY'): + if 'HISTORY' in f[0].header: f[0].header.update(key='UPWCSVER', value=stwcs.__version__, comment="Version of STWCS used to updated the WCS", before='HISTORY') f[0].header.update(key='PYWCSVER', value=pywcs.__version__, comment="Version of PYWCS used to updated the WCS", before='HISTORY') - elif f[0].header.has_key('ASN_MTYP'): + elif 'ASN_MTYP' in f[0].header: f[0].header.update(key='UPWCSVER', value=stwcs.__version__, comment="Version of STWCS used to updated the WCS", after='ASN_MTYP') f[0].header.update(key='PYWCSVER', value=pywcs.__version__, |