Skip to content

Commit a7d50e1

Browse files
committed
lesson_check.py: report check status at the end
1 parent 6b49768 commit a7d50e1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

bin/lesson_check.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77
import glob
88
import re
9+
import sys
910
from argparse import ArgumentParser
1011

1112
# This uses the `__all__` list in `util.py` to determine what objects to import
@@ -142,8 +143,16 @@ def main():
142143
checker.check()
143144

144145
args.reporter.report()
145-
if args.reporter.messages and not args.permissive:
146-
exit(1)
146+
if args.reporter.messages:
147+
if args.permissive:
148+
print("Problems detected but ignored (permissive mode).")
149+
else:
150+
print("Problems detected.")
151+
sys.exit(1)
152+
else:
153+
print("No problems found.")
154+
155+
return
147156

148157

149158
def parse_args():

0 commit comments

Comments
 (0)