[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20210408-16-ga478607

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=a478607b1706a2184090e31ba74ce0569333cd06

commit a478607b1706a2184090e31ba74ce0569333cd06
Author: Jon Turney <[email protected]>
Date:   Thu May 20 14:56:07 2021 +0100

    Have irkerd send our messages to libera.chat as well

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

commit 79d4099c2d6a4000302bdb1662dd4c8b1661dac9
Author: Jon Turney <[email protected]>
Date:   Thu May 20 14:55:25 2021 +0100

    Allow 'orphaned package maintainers' to run untest on them


Diff:
---
 calm/irk.py    | 22 +++++++++++++---------
 calm/untest.py |  2 +-
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/calm/irk.py b/calm/irk.py
index 5dd195d..40986b9 100755
--- a/calm/irk.py
+++ b/calm/irk.py
@@ -12,7 +12,7 @@ import socket
 import sys
 
 DEFAULT_SERVER = ("localhost", 6659)
-DEFAULT_TARGET = 'cygwin-bots'
+DEFAULT_TARGET = ['cygwin-bots', 'irc://irc.libera.chat/cygwin-bots']
 
 
 def connect(server=DEFAULT_SERVER):
@@ -26,16 +26,20 @@ def send(s, target, message):
 
 
 def irk(message, target=DEFAULT_TARGET, server=DEFAULT_SERVER):
-    try:
-        s = connect(server)
-        if "irc:" not in target and "ircs:" not in target:
-            target = "irc://chat.freenode.net/{0}".format(target)
+    if not isinstance(target, list):
+        target = [target]
+
+    for t in target:
+        try:
+            s = connect(server)
+            if "irc:" not in t and "ircs:" not in t:
+                t = "irc://chat.freenode.net/{0}".format(t)
 
-        send(s, target, message)
+            send(s, t, message)
 
-        s.close()
-    except OSError:
-        pass
+            s.close()
+        except OSError:
+            pass
 
 
 def main():
diff --git a/calm/untest.py b/calm/untest.py
index b749c15..48a3446 100644
--- a/calm/untest.py
+++ b/calm/untest.py
@@ -45,7 +45,7 @@ def untest(pvr):
     cygname = os.environ['CYGNAME']
 
     mlist = {}
-    mlist = maintainers.add_packages(mlist, common_constants.PKGMAINT)
+    mlist = maintainers.add_packages(mlist, common_constants.PKGMAINT, orphanMaint=common_constants.ORPHANMAINT)
 
     if cygname not in mlist:
         logging.error("'%s' is not a package maintainer" % (cygname))
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.