use sys.exit

This commit is contained in:
Robert Kaussow 2019-04-16 10:09:14 +02:00
parent d6b954c77c
commit 37740d1041
1 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,7 @@
"""Main program."""
import argparse
import sys
from ansiblelater import LOG
from ansiblelater import __version__
@ -56,7 +57,12 @@ def main():
else:
LOG.info("Couldn't classify file %s" % filename)
return errors
if not errors == 0:
return_code = 1
else:
return_code = 0
sys.exit(return_code)
if __name__ == "__main__":