mirror of
https://github.com/derrod/legendary.git
synced 2025-08-03 22:51:02 +00:00
[utils/cli] Accept empty string as a falsey value in strtobool
Some UE asset manifests seem to have `"OwnershipToken": ""` instead of something `strtobool` could understand. When trying to import these through `egl-sync` an exception is being raised, which blocks importing other titles too. The other use of `strtobool` is in `LGDRY_NO_WINE` environment variable, which also causes an exception if set as `LGDRY_NO_WINE=`
This commit is contained in:
parent
3963382b3f
commit
73c9078a85
|
@ -84,7 +84,7 @@ def strtobool(val):
|
|||
val = val.lower()
|
||||
if val in ('y', 'yes', 't', 'true', 'on', '1'):
|
||||
return 1
|
||||
elif val in ('n', 'no', 'f', 'false', 'off', '0'):
|
||||
elif val in ('n', 'no', 'f', 'false', 'off', '0', ''):
|
||||
return 0
|
||||
else:
|
||||
raise ValueError("invalid truth value %r" % (val,))
|
||||
|
|
Loading…
Reference in a new issue