From e501ee2ac8f6657aa0fe428bee2eb5d1084fa95d Mon Sep 17 00:00:00 2001 From: Arthur She Date: Fri, 20 Nov 2015 12:53:56 -0800 Subject: Do nothing while '-h' in the argv. --- check-link.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check-link.py b/check-link.py index d09fd06..17f4492 100755 --- a/check-link.py +++ b/check-link.py @@ -8,6 +8,7 @@ import sys OUTPUT_FILE = "./link_check_result.txt" argv = sys.argv +# Replace command to linkchecker argv[0] = 'linkchecker' if '-F' in argv: argv[argv.index('-F')+1] = "text" @@ -20,6 +21,8 @@ ret = subprocess.call(argv) if ret == 2: exit(1) +if '-h' in argv: + exit(0) # Have the final output of linkchecker ifile = open('./linkchecker-out.txt', 'r') rest_str = ifile.read() -- cgit v1.2.3