Skip to content

Commit 7253861

Browse files
authored
Ensure run() handles exiting and unreachable code removed (#77)
AB#8310
1 parent 7a5fc55 commit 7253861

5 files changed

Lines changed: 1 addition & 20 deletions

File tree

archivist_samples/c2pa/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# pylint: disable=missing-docstring
44

55
import logging
6-
from sys import exit as sys_exit
7-
from sys import stdout as sys_stdout
86

97
from ..testing.archivist_parser import common_parser
108
from ..testing.parser import common_endpoint
@@ -30,6 +28,3 @@ def main():
3028
poc = common_endpoint("document", args)
3129

3230
run(poc, args)
33-
34-
parser.print_help(sys_stdout)
35-
sys_exit(1)

archivist_samples/c2pa/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,4 @@ def run(arch, args):
179179
},
180180
)
181181
LOGGER.info("V1.3.ME published")
182+
sys_exit(0)

archivist_samples/document/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# pylint: disable=missing-docstring
44

55
import logging
6-
from sys import exit as sys_exit
7-
from sys import stdout as sys_stdout
86

97
from ..testing.archivist_parser import common_parser
108
from ..testing.parser import common_endpoint
@@ -30,6 +28,3 @@ def main():
3028
poc = common_endpoint("document", args)
3129

3230
run(poc, args)
33-
34-
parser.print_help(sys_stdout)
35-
sys_exit(1)

archivist_samples/sbom_document/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# pylint: disable=missing-docstring
44

55
import logging
6-
from sys import exit as sys_exit
7-
from sys import stdout as sys_stdout
86

97
from ..testing.archivist_parser import common_parser
108
from ..testing.parser import common_endpoint
@@ -32,6 +30,3 @@ def main():
3230
arch = common_endpoint("sbom", args)
3331

3432
run(arch, args)
35-
36-
parser.print_help(sys_stdout)
37-
sys_exit(1)

archivist_samples/wipp/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# pylint: disable=missing-docstring
44

55
import logging
6-
from sys import exit as sys_exit
7-
from sys import stdout as sys_stdout
86

97
from ..testing.archivist_parser import common_parser
108
from ..testing.parser import common_endpoint
@@ -30,6 +28,3 @@ def main():
3028
poc = common_endpoint("wipp", args)
3129

3230
run(poc, args)
33-
34-
parser.print_help(sys_stdout)
35-
sys_exit(1)

0 commit comments

Comments
 (0)