Bugfix in _cast_by_example, see issue #109

This commit is contained in:
Daniel Goldberg 2018-03-29 15:39:47 +03:00
parent 225c7fae6f
commit 3aa1b9e5a9
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def _cast_by_example(value, example):
if example_type is str:
return str(os.path.expandvars(value))
elif example_type is tuple and len(example) != 0:
if value is None or value == tuple(None):
if value is None or value == tuple([None]):
return tuple()
return tuple([_cast_by_example(x, example[0]) for x in value])
elif example_type is list and len(example) != 0: