[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210626-43-ga5ee43e

Jon TURNEY via Cygwin-apps-cvs <[email protected]>
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=a5ee43ec3aec88ce5fed804a926bfbb4b44a35e0

commit a5ee43ec3aec88ce5fed804a926bfbb4b44a35e0
Author: Jon Turney <[email protected]>
Date:   Sun May 22 13:26:29 2022 +0100

    Fix maintainer action log filtering

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=f32a2a0ef3fe625fc0d97353158b0747037d4f8f

commit f32a2a0ef3fe625fc0d97353158b0747037d4f8f
Author: Jon Turney <[email protected]>
Date:   Mon Mar 7 15:00:30 2022 +0000

    Improve 'calm --email=debug'


Diff:
---
 calm/buffering_smtp_handler.py | 3 +++
 calm/calm.py                   | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/calm/buffering_smtp_handler.py b/calm/buffering_smtp_handler.py
index 10b1e7b..b7dfee7 100644
--- a/calm/buffering_smtp_handler.py
+++ b/calm/buffering_smtp_handler.py
@@ -79,6 +79,9 @@ class BufferingSMTPHandler(logging.handlers.BufferingHandler):
             # if toaddrs consists of the single address 'debug', just dump the mail we would have sent
             if self.toaddrs == ['debug']:
                 print('-' * 40)
+                for k in m:
+                    print('%s: %s' % (k, m[k]))
+                print('-' * 40)
                 print(msg)
                 print('-' * 40)
             else:
diff --git a/calm/calm.py b/calm/calm.py
index a71497e..62dc902 100755
--- a/calm/calm.py
+++ b/calm/calm.py
@@ -145,7 +145,7 @@ def process_uploads(args, state):
     for name in sorted(mlist.keys()):
         m = mlist[name]
 
-        with logfilters.AttrFilter(maint=m):
+        with logfilters.AttrFilter(maint=m.name):
             process_maintainer_uploads(args, state, all_packages, m)
 
     # record updated reminder times for maintainers
@@ -646,6 +646,9 @@ def mail_cb(state, loghandler):
         if m.name == 'ORPHANED':
             email = common_constants.EMAILS.split(',')
 
+        if state.args.email == ['debug']:
+            email = ['debug']
+
         maint_email = BufferingSMTPHandler(email, subject='%s for %s' % (state.subject, m.name))
         threshold = logging.WARNING if m.quiet else logging.INFO
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.