1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 17:14:18 +00:00

more tests

This commit is contained in:
deadc0de6
2023-02-06 15:44:26 +01:00
committed by deadc0de
parent 8d478e458d
commit 1cb5a03ce7
2 changed files with 65 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ class LinkTypes(IntEnum):
try:
return key if isinstance(key, cls) else cls[key.upper()]
except KeyError as exc:
if default:
if default and isinstance(default, cls):
return default
err = f'bad {cls.__name__} value: "{key}"'
raise ValueError(err) from exc