Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-06-21 23:11:29 +0300
committerlovetox <philipp@hoerist.com>2020-06-29 23:27:40 +0300
commitc6ed9f3382f99edc96432dd370117fcbc5b7d44e (patch)
tree75af37e50e54d457aee80f4df01341a3dc5dc2e5
parentf1a59608d98d88008d1c400ce0c115427956f19a (diff)
[openpgp] Add debug logging for python-gnupg
-rw-r--r--openpgp/backend/pygpg.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/openpgp/backend/pygpg.py b/openpgp/backend/pygpg.py
index 934987d..78f603a 100644
--- a/openpgp/backend/pygpg.py
+++ b/openpgp/backend/pygpg.py
@@ -23,6 +23,10 @@ import gnupg
from openpgp.modules.util import DecryptionFailed
log = logging.getLogger('gajim.p.openpgp.pygnupg')
+if log.getEffectiveLevel() == logging.DEBUG:
+ log = logging.getLogger('gnupg')
+ log.addHandler(logging.StreamHandler())
+ log.setLevel(logging.DEBUG)
KeyringItem = namedtuple('KeyringItem', 'jid keyid fingerprint')