Improve logging
- Don't re-configure lacre.notify logger. - Issue more DEBUG logs when deleting keys.
This commit is contained in:
parent
5c327b166a
commit
07539a97d3
2 changed files with 3 additions and 3 deletions
|
@ -8,8 +8,6 @@ from email.mime.text import MIMEText
|
|||
from email.mime.multipart import MIMEMultipart
|
||||
import markdown
|
||||
|
||||
# Read configuration from /etc/gpg-mailgate.conf
|
||||
conf.load_config()
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -166,12 +166,14 @@ class KeyConfirmationQueue:
|
|||
def delete_keys(self, row_id, /, email=None):
|
||||
"""Remove key from the database."""
|
||||
if email is not None:
|
||||
LOG.debug('Deleting key: %s, %s', row_id, email)
|
||||
delq = delete(self._keys).where(and_(self._keys.c.email == email, self._keys.c.id != row_id))
|
||||
else:
|
||||
LOG.debug('Deleting key: %s', row_id)
|
||||
delq = delete(self._keys).where(self._keys.c.id != row_id)
|
||||
|
||||
LOG.debug('Deleting public keys associated with confirmed email: %s', delq)
|
||||
with self._engine.connect() as conn:
|
||||
LOG.debug('Deleting public keys associated with confirmed email: %s', delq)
|
||||
conn.execute(delq)
|
||||
|
||||
def delete_key_by_email(self, email):
|
||||
|
|
Loading…
Reference in a new issue