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