calcurse-caldav: use isinstance() instead of comparing types

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2023-11-06 15:45:08 -05:00
parent f6090c7e17
commit 80cd8af956

View File

@ -77,7 +77,7 @@ class Config:
for key, val in config.items(sec):
if key not in self._map[sec]:
die('Unexpected config key in section {}: {}'.format(sec, key))
if type(self._map[sec][key]) == bool:
if isinstance(self._map[sec][key], bool):
self._map[sec][key] = config.getboolean(sec, key)
else:
self._map[sec][key] = val