Skip to content

Commit

Permalink
if-else instead of try-except
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Nov 11, 2024
1 parent be76347 commit 789c5c5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions jdaviz/configs/imviz/plugins/footprints/footprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,10 @@ def vue_link_by_wcs(self, *args):
# are retained. Remove this method if support for plotting footprints
# when pixel-linked is reintroduced.
op = self.app._jdaviz_helper.plugins['Orientation']
try:
self.app._jdaviz_helper.plugins['Orientation'].align_by = 'WCS'
except ValueError:
# require the user to go to through the orientation plugin to
# delete subsets and change link type
if op._obj.need_clear_astrowidget_markers or op._obj.need_clear_subsets:
op.open_in_tray()
else:
op.align_by = 'WCS'

def _ensure_first_overlay(self):
if not len(self._overlays):
Expand Down

0 comments on commit 789c5c5

Please sign in to comment.