argparser: Also catch TypeError for multitype_conv.

This commit is contained in:
Florian Bruhin 2014-09-06 21:37:48 +02:00
parent 47f42f9e5a
commit 13a2506c6a

View File

@ -109,7 +109,7 @@ def multitype_conv(tpl):
return value
try:
return typ(value)
except ValueError:
except (TypeError, ValueError):
pass
raise cmdexc.ArgumentTypeError('Invalid value {}.'.format(value))