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-22 00:17:47 +0300
commitc16625f886904b211325b0d6892c9201697e18b5 (patch)
treeadc0ceb04349f510e4b24400608bfb44c3434ee6 /openpgp
parent9e3e4d459aba8ff214caee7b521570d4e5289cd2 (diff)
[openpgp] Add debug logging for python-gnupg
Diffstat (limited to 'openpgp')
-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')