mirror of
https://github.com/clearml/clearml
synced 2025-02-07 21:33:25 +00:00
Fix default argparser value handling when value is None
This commit is contained in:
parent
af0b8f4c70
commit
b50bfd5b63
@ -253,7 +253,10 @@ class _Arguments(object):
|
||||
elif current_action and current_action.type:
|
||||
arg_parser_argeuments[k] = v
|
||||
try:
|
||||
arg_parser_argeuments[k] = v = current_action.type(v)
|
||||
if current_action.default is None and current_action.type != str and not v:
|
||||
arg_parser_argeuments[k] = v = None
|
||||
else:
|
||||
arg_parser_argeuments[k] = v = current_action.type(v)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user