mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2024-11-22 00:04:01 +01:00
linkcheck: move argparsing to main function
This commit is contained in:
parent
2d5336d3ed
commit
f66c272fc2
@ -121,7 +121,7 @@ Usage: python main.py [action] <inputfile> <outfile>
|
||||
sys.exit(status)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main() -> None:
|
||||
if len(sys.argv) < 2:
|
||||
print_usage(1)
|
||||
action = sys.argv[1]
|
||||
@ -144,3 +144,7 @@ if __name__ == "__main__":
|
||||
print_usage(0)
|
||||
else:
|
||||
print_usage(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user