From af2d8413f7fa9521242922c946326903626ea42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sat, 1 Sep 2018 23:57:14 +0300 Subject: [PATCH] Give different return code if we found nothing in sshwot-filter --- src/main-filter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main-filter.py b/src/main-filter.py index b1ab342..1c043b8 100644 --- a/src/main-filter.py +++ b/src/main-filter.py @@ -121,6 +121,9 @@ def main(): # Print the matches in sshwot format write_file.write(args.outfile, matches) + # If we found nothing, return code 2 + sys.exit(2) + if __name__ == '__main__': try: main()