From 7759e7fc1ac613c0285ecab29c1df004729aa598 Mon Sep 17 00:00:00 2001 From: elicn Date: Thu, 21 Apr 2022 14:03:35 +0300 Subject: [PATCH] Remove Python 3.6 workaround --- qltool | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qltool b/qltool index d6aae3935..2ce8fa3c2 100755 --- a/qltool +++ b/qltool @@ -170,7 +170,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--version', action='version', version=f'qltool for Qiling {ql_ver}, using Unicorn {uc_ver}') - commands = parser.add_subparsers(title='sub commands', description='select execution mode', dest='subcommand') + commands = parser.add_subparsers(title='sub commands', description='select execution mode', dest='subcommand', required=True) # set "run" subcommand options run_parser = commands.add_parser('run', help='run a program') @@ -219,11 +219,6 @@ if __name__ == '__main__': comm_parser.add_argument('--libcache', action='store_true', help='enable dll caching for windows') options = parser.parse_args() - # subparser argument required=True is not supported in python 3.6 - # manually check whether the user did not specify a subcommand (execution mode) - if not options.subcommand: - parser.error('please select execution mode') - if options.subcommand == 'examples': handle_examples(parser)