]> granicus.if.org Git - python/commitdiff
Added note() message to Page class -- this was used but didn't exist.
authorGuido van Rossum <guido@python.org>
Thu, 6 Aug 1998 21:31:13 +0000 (21:31 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 6 Aug 1998 21:31:13 +0000 (21:31 +0000)
(The alternative would be to call self.checker.note() but since
self.checker might be None that's not quite right.

Tools/webchecker/webchecker.py

index 13ea0b637c35569d351fbdcc582534f97df036df..93078bb94bc380b5a94e1685a05a2ca1aa834cc9 100755 (executable)
@@ -546,6 +546,15 @@ class Page:
         self.maxpage = maxpage
         self.checker = checker
 
+    def note(self, level, msg, *args):
+        if self.checker:
+            apply(self.checker.note, (level, msg) + args)
+        else:
+            if self.verbose >= level:
+                if args:
+                    msg = msg%args
+                print msg
+
     def getlinkinfos(self):
         size = len(self.text)
         if size > self.maxpage: