Skip to content

Commit 573ce1f

Browse files
committed
Remove Python 3.6 workaround
1 parent 2bd8c93 commit 573ce1f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

qltool

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ if __name__ == '__main__':
170170
parser = argparse.ArgumentParser()
171171
parser.add_argument('--version', action='version', version=f'qltool for Qiling {ql_ver}, using Unicorn {uc_ver}')
172172

173-
commands = parser.add_subparsers(title='sub commands', description='select execution mode', dest='subcommand')
173+
commands = parser.add_subparsers(title='sub commands', description='select execution mode', dest='subcommand', required=True)
174174

175175
# set "run" subcommand options
176176
run_parser = commands.add_parser('run', help='run a program')
@@ -219,11 +219,6 @@ if __name__ == '__main__':
219219
comm_parser.add_argument('--libcache', action='store_true', help='enable dll caching for windows')
220220
options = parser.parse_args()
221221

222-
# subparser argument required=True is not supported in python 3.6
223-
# manually check whether the user did not specify a subcommand (execution mode)
224-
if not options.subcommand:
225-
parser.error('please select execution mode')
226-
227222
if options.subcommand == 'examples':
228223
handle_examples(parser)
229224

0 commit comments

Comments
 (0)