[packages/pldnotify] Add method to pretty print checker name

glen glen at pld-linux.org
Thu Feb 25 12:57:24 CET 2021


commit d81e943a49e20a865c493d92c0a1c986fd5c300a
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Feb 25 13:30:14 2021 +0200

    Add method to pretty print checker name

 pldnotify.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/pldnotify.py b/pldnotify.py
index 3e5c15b..43ad327 100755
--- a/pldnotify.py
+++ b/pldnotify.py
@@ -66,6 +66,8 @@ class AbstractChecker:
     def __init__(self, stable):
         self.stable = stable
 
+    def __str__(self):
+        return "%r" % self.__class__.__name__
 
 class CheckReleaseMonitoring(AbstractChecker):
     distro = 'pld-linux'
@@ -140,7 +142,7 @@ class Checker:
             try:
                 v = checker.find_latest(spec)
             except ValueError as e:
-                print("WARNING: skipping %s: %s" % (name, e))
+                print("WARNING: skipping %s: %s" % (checker, e))
                 continue
 
             if self.debug:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pldnotify.git/commitdiff/d81e943a49e20a865c493d92c0a1c986fd5c300a



More information about the pld-cvs-commit mailing list