Add ability to deliver cleartext when keys can't be loaded #135

Merged
pfm merged 3 commits from fix/keys-not-loaded into main 2023-12-10 21:41:49 +01:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit e8d0d248b3 - Show all commits

View File

@ -4,6 +4,7 @@ from sqlalchemy import create_engine, select, delete, and_, func
from sqlalchemy.exc import OperationalError
import logging
from lacre.config import flag_enabled
from lacre._keyringcommon import KeyRing, KeyCache
import lacre.dbschema as db
@ -89,7 +90,7 @@ class IdentityRepository(KeyRing):
try:
return self._load_identities()
except OperationalError:
if conf.flag_enabled('daemon', 'bounce_on_keys_missing'):
if flag_enabled('daemon', 'bounce_on_keys_missing'):
raise
else:
LOG.exception('Failed to load keys, returning empty collection')