summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/stwcs/updatewcs/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stwcs/updatewcs/utils.py b/lib/stwcs/updatewcs/utils.py
index 9a66225..1214199 100644
--- a/lib/stwcs/updatewcs/utils.py
+++ b/lib/stwcs/updatewcs/utils.py
@@ -255,7 +255,7 @@ def remove_distortion(fname, dist_keyword):
for kw in keywords:
try:
del f[hdu].header[kw]
- except AttributeError:
+ except KeyError:
pass
ext_mapping = altwcs.mapFitsExt2HDUListInd(fname, extname).values()
ext_mapping.sort()