mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-06-02 00:19:47 +02:00
use sys.exit
This commit is contained in:
parent
d6b954c77c
commit
37740d1041
|
@ -2,6 +2,7 @@
|
||||||
"""Main program."""
|
"""Main program."""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
from ansiblelater import LOG
|
from ansiblelater import LOG
|
||||||
from ansiblelater import __version__
|
from ansiblelater import __version__
|
||||||
|
@ -56,7 +57,12 @@ def main():
|
||||||
else:
|
else:
|
||||||
LOG.info("Couldn't classify file %s" % filename)
|
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__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user