Skip to content

Commit 0892a7c

Browse files
committed
Catch exceptions when casting config list types
1 parent 0991fc3 commit 0892a7c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Added
1616
Fixed
1717
=====
1818

19+
- Fix loading of lists in config
1920
- Final side bar button border color in 1-bit color mode
2021
- First input not visible in notebook console if it has no output
2122

euporie/core/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,10 @@ def _load_user(self, prefix: str | None = None) -> dict[str, Any]:
577577
# Attempt to cast the value to the desired type
578578
if isinstance(value, list):
579579
for i, item in enumerate(value[:]):
580-
value[i] = setting.type(item)
580+
try:
581+
value[i] = setting.type(item)
582+
except (ValueError, TypeError):
583+
pass
581584
else:
582585
try:
583586
value = setting.type(value)

0 commit comments

Comments
 (0)