argparser: Also catch TypeError for multitype_conv.
This commit is contained in:
parent
47f42f9e5a
commit
13a2506c6a
@ -109,7 +109,7 @@ def multitype_conv(tpl):
|
|||||||
return value
|
return value
|
||||||
try:
|
try:
|
||||||
return typ(value)
|
return typ(value)
|
||||||
except ValueError:
|
except (TypeError, ValueError):
|
||||||
pass
|
pass
|
||||||
raise cmdexc.ArgumentTypeError('Invalid value {}.'.format(value))
|
raise cmdexc.ArgumentTypeError('Invalid value {}.'.format(value))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user