Skip to content

Commit

Permalink
Remove Python 3.6 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
elicn committed Apr 24, 2022
1 parent 2bd8c93 commit 573ce1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions qltool
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 573ce1f

Please sign in to comment.