Updated for recurring options

This commit is contained in:
Dimitris Zlatanidis 2023-03-17 21:39:52 +02:00
parent df00293d6e
commit 6845f32f39

View file

@ -283,6 +283,9 @@ class Argparse(Configs):
if opt[0] == '-' and opt in self.options: if opt[0] == '-' and opt in self.options:
if self.flags.count(opt) > 1: if self.flags.count(opt) > 1:
repeat.append(opt) repeat.append(opt)
if len(opt) > 2:
if opt == self.options[self.options.index(opt)]:
repeat.append(opt)
# Fixed for recurring options. # Fixed for recurring options.
if repeat: if repeat: