File: notifail.py

package info (click to toggle)
apache2 2.4.66-5
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 59,500 kB
  • sloc: ansic: 212,331; python: 13,830; perl: 11,307; sh: 7,258; php: 1,320; javascript: 1,314; awk: 749; makefile: 715; lex: 374; yacc: 161; xml: 2
file content (16 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

import sys


def main(argv):
    if len(argv) > 1:
        msg = argv[2] if len(argv) > 2 else None
        # fail on later messaging stages, not the initial 'renewing' one.
        # we have test_901_030 that check that later stages are not invoked
        # when misconfigurations are detected early.
        sys.exit(1 if msg != "renewing" else 0)
    

if __name__ == "__main__":
    main(sys.argv)