Skip to content

Commit

Permalink
Revert "resave main() returns nothing to indicate no error"
Browse files Browse the repository at this point in the history
This reverts commit 448016e.
  • Loading branch information
will-moore committed Aug 29, 2024
1 parent 448016e commit c3bdbfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ome2024_ngff_challenge/resave.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,10 @@ def write(
config.zr_write_text(filename, text)


def main(ns: argparse.Namespace) -> None:
def main(ns: argparse.Namespace) -> int:
"""
If no images are converted, raises SystemExit.
If no images are converted, raises
SystemExit. Otherwise, return the number of images.
"""

converted: int = 0
Expand Down Expand Up @@ -549,6 +550,7 @@ def main(ns: argparse.Namespace) -> None:

if converted == 0:
raise SystemExit(1)
return converted


def cli(subparsers: argparse._SubParsersAction):
Expand Down

0 comments on commit c3bdbfb

Please sign in to comment.