Update ifmain to my standard format.
This commit is contained in:
parent
ba3dedd39a
commit
8a3e823a2e
1 changed files with 5 additions and 2 deletions
|
@ -443,7 +443,7 @@ def download_argparse(args):
|
|||
break
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument('url')
|
||||
|
@ -458,5 +458,8 @@ if __name__ == '__main__':
|
|||
parser.add_argument('--no-ssl', dest='no_ssl', action='store_true')
|
||||
parser.set_defaults(func=download_argparse)
|
||||
|
||||
args = parser.parse_args()
|
||||
args = parser.parse_args(argv)
|
||||
return args.func(args)
|
||||
|
||||
if __name__ == '__main__':
|
||||
raise SystemExit(main(sys.argv[1:]))
|
||||
|
|
Loading…
Reference in a new issue