diff mbox series

gnupg: Add gpg status output to debug logging

Message ID 20211007165801.2313136-1-keescook@chromium.org (mailing list archive)
State New, archived
Headers show
Series gnupg: Add gpg status output to debug logging | expand

Commit Message

Kees Cook Oct. 7, 2021, 4:58 p.m. UTC
There wasn't an easy way to see how a failure was being determined by
GPG, so add the entire GPG status output to the debug log.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 patatt/__init__.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Konstantin Ryabitsev Oct. 7, 2021, 6:10 p.m. UTC | #1
On Thu, 7 Oct 2021 09:58:01 -0700, Kees Cook wrote:
> There wasn't an easy way to see how a failure was being determined by
> GPG, so add the entire GPG status output to the debug log.
> 
> 

Applied with minor stylistic changes to both main and stable-0.4.y,
thanks!

[1/1] gnupg: Add gpg status output to debug logging
      commit: a7ec0c10429bb1e14591e33c08baf3aee28c26dd

Best regards,
diff mbox series

Patch

diff --git a/patatt/__init__.py b/patatt/__init__.py
index 2e33bce209e2..6f4591973751 100644
--- a/patatt/__init__.py
+++ b/patatt/__init__.py
@@ -371,6 +371,7 @@  class DevsigHeader:
         signtime = ''
         signkey = ''
 
+        logger.debug('GNUPG status:\n\t%s' % ("\n\t".join(status.decode().strip().split('\n'))))
         gs_matches = re.search(rb'^\[GNUPG:] GOODSIG ([0-9A-F]+)\s+(.*)$', status, flags=re.M)
         if gs_matches:
             good = True