check-provision: Replace optparse with argparse.

This commit is contained in:
rht 2017-09-30 08:42:22 +02:00 committed by Tim Abbott
parent 2ce9e4d9a1
commit 3ac8ab8be3
1 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import optparse import argparse
import sys import sys
tools_dir = os.path.dirname(os.path.abspath(__file__)) tools_dir = os.path.dirname(os.path.abspath(__file__))
@ -14,11 +14,11 @@ from tools.lib.test_script import (
def run(): def run():
# type: () -> None # type: () -> None
parser = optparse.OptionParser() parser = argparse.ArgumentParser()
parser.add_option('--force', default=False, parser.add_argument('--force', default=False,
action="store_true", action="store_true",
help='Run tests despite possible problems.') help='Run tests despite possible problems.')
(options, args) = parser.parse_args() options = parser.parse_args()
if not options.force: if not options.force:
ok, msg = get_provisioning_status() ok, msg = get_provisioning_status()