MCPcopy Create free account
hub / github.com/apache/httpd / main

Function main

test/modules/md/msg_fail_on.py:7–24  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

5
6
7def main(argv):
8 if len(argv) > 3:
9 log = argv[1]
10 fail_on = argv[2]
11 cmd = argv[3]
12 domain = argv[4]
13 if 'renewing' != cmd:
14 f1 = open(log, 'a+')
15 f1.write(f"{[argv[0], log, cmd, domain]}\n")
16 f1.close()
17 if cmd.startswith(fail_on):
18 sys.stderr.write(f"failing on: {cmd}\n")
19 sys.exit(1)
20 sys.stderr.write("done, all fine.\n")
21 sys.exit(0)
22 else:
23 sys.stderr.write("%s without arguments" % (argv[0]))
24 sys.exit(7)
25
26
27if __name__ == "__main__":

Callers 1

msg_fail_on.pyFile · 0.70

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected