Skip to content

Commit 8b335f6

Browse files
committed
move sutdown outside main def
1 parent 4b6fdb9 commit 8b335f6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/clamav_report/__main__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
"""Code to run if this package is used as a Python module."""
22

3+
import logging
34
from .clamav_report import main
45

5-
main()
6+
try:
7+
main()
8+
finally:
9+
# Stop logging and clean up
10+
logging.shutdown()

src/clamav_report/clamav_report.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,3 @@ def main() -> None:
285285
)
286286
write_csv(FIELDS, csv_data, validated_args["<output-csv-file>"])
287287

288-
# Stop logging and clean up
289-
logging.shutdown()

0 commit comments

Comments
 (0)