Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 20, 2024
1 parent 5fa47ad commit 35f1ea7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions romancal/tweakreg/tweakreg_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ def process(self, input):
self.log.info("Skipping TweakReg for spectral exposure.")
image_model.meta.cal_step.tweakreg = "SKIPPED"
else:
source_catalog = getattr(
image_model.meta, "source_catalog", None
)
source_catalog = getattr(image_model.meta, "source_catalog", None)
if source_catalog is None:
images.shelve(image_model, i, modify=False)
raise AttributeError(
Expand All @@ -162,9 +160,7 @@ def process(self, input):
)

try:
catalog = self.get_tweakreg_catalog(
source_catalog, image_model
)
catalog = self.get_tweakreg_catalog(source_catalog, image_model)
except AttributeError as e:
self.log.error(f"Failed to retrieve tweakreg_catalog: {e}")
images.shelve(image_model, i, modify=False)
Expand Down

0 comments on commit 35f1ea7

Please sign in to comment.