Skip to content

Commit

Permalink
turn exit calls into exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Nov 26, 2024
1 parent fc1a659 commit f3e25f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions romancal/pipeline/mosaic_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ def process(self, input):
# open the input file
file_type = filetype.check(input)
if file_type == "asdf":
log.info("The level three pipeline input needs to be an association")
exit(0)
return
raise TypeError("The level three pipeline input needs to be an association")

if file_type == "asn":
input = ModelLibrary(input, on_disk=self.on_disk)
Expand Down Expand Up @@ -135,8 +133,9 @@ def process(self, input):
self.sourcecatalog.output_file = self.output_file
result_catalog = self.sourcecatalog.run(result)
else:
log.info("resampling a mosaic file is not yet supported")
exit(0)
raise NotImplementedError(
"resampling a mosaic file is not yet supported"
)

else:
self.resample.suffix = "i2d"
Expand Down

0 comments on commit f3e25f8

Please sign in to comment.