Skip to content

Commit

Permalink
use isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Aug 14, 2023
1 parent c67ebcc commit d9b73df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jwst/assign_wcs/nirspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def get_open_slits(input_model, reference_files=None, slit_y_range=[-.55, .55]):
"""
exp_type = input_model.meta.exposure.type.lower()
lamp_mode = input_model.meta.instrument.lamp_mode
if type(lamp_mode) == str:
if isinstance(lamp_mode, str):
lamp_mode = lamp_mode.lower()
else:
lamp_mode = 'none'
Expand Down Expand Up @@ -1825,7 +1825,7 @@ def nrs_lamp(input_model, reference_files, slit_y_range):
The slit dimensions relative to the center of the slit.
"""
lamp_mode = input_model.meta.instrument.lamp_mode
if type(lamp_mode) == str:
if isinstance(lamp_mode, str):
lamp_mode = lamp_mode.lower()
else:
lamp_mode = 'none'
Expand Down

0 comments on commit d9b73df

Please sign in to comment.