[Buildbot-commits] buildbot/buildbot/status client.py, 1.30, 1.31 mail.py, 1.36, 1.37

Brian Warner warner at users.sourceforge.net
Sat Mar 22 22:15:12 UTC 2008


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20913/buildbot/status

Modified Files:
	client.py mail.py 
Log Message:
[project @ hush more pyflakes: log.msg vs other uses of a variable named 'log']

Original author: warner at lothar.com
Date: 2008-03-22 22:12:31+00:00

Index: client.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/client.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- client.py	1 Nov 2007 08:27:20 -0000	1.30
+++ client.py	22 Mar 2008 22:15:10 -0000	1.31
@@ -1,7 +1,7 @@
 # -*- test-case-name: buildbot.test.test_status -*-
 
 from twisted.spread import pb
-from twisted.python import log, components
+from twisted.python import components, log as twlog
 from twisted.internet import reactor
 from twisted.application import strports
 from twisted.cred import portal, checkers
@@ -361,17 +361,17 @@
         return d
 
     def attached(self, mind):
-        #log.msg("StatusClientPerspective.attached")
+        #twlog.msg("StatusClientPerspective.attached")
         return self
 
     def detached(self, mind):
-        log.msg("PB client detached")
+        twlog.msg("PB client detached")
         self.client = None
         for name in self.subscribed_to_builders:
-            log.msg(" unsubscribing from Builder(%s)" % name)
+            twlog.msg(" unsubscribing from Builder(%s)" % name)
             self.status.getBuilder(name).unsubscribe(self)
         for s in self.subscribed_to:
-            log.msg(" unsubscribe from %s" % s)
+            twlog.msg(" unsubscribe from %s" % s)
             s.unsubscribe(self)
         self.subscribed = None
 
@@ -397,7 +397,7 @@
 
         assert mode in ("builders", "builds", "steps", "logs", "full")
         assert target
-        log.msg("PB subscribe(%s)" % mode)
+        twlog.msg("PB subscribe(%s)" % mode)
 
         self.client = target
         self.subscribed = mode
@@ -409,7 +409,7 @@
         return None
 
     def perspective_unsubscribe(self):
-        log.msg("PB unsubscribe")
+        twlog.msg("PB unsubscribe")
         self.status.unsubscribe(self)
         self.subscribed_to.remove(self.status)
         self.client = None

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- mail.py	1 Aug 2007 20:31:43 -0000	1.36
+++ mail.py	22 Mar 2008 22:15:10 -0000	1.37
@@ -15,7 +15,7 @@
 from zope.interface import implements
 from twisted.internet import defer
 from twisted.mail.smtp import sendmail
-from twisted.python import log
+from twisted.python import log as twlog
 
 from buildbot import interfaces, util
 from buildbot.status import base
@@ -153,7 +153,7 @@
 
         # you should either limit on builders or categories, not both
         if self.builders != None and self.categories != None:
-            log.err("Please specify only builders to ignore or categories to include")
+            twlog.err("Please specify only builders to ignore or categories to include")
             raise # FIXME: the asserts above do not raise some Exception either
 
     def setServiceParent(self, parent):
@@ -292,10 +292,10 @@
         if patch or self.addLogs:
             haveAttachments = True
             if not canDoAttachments:
-                log.msg("warning: I want to send mail with attachments, "
-                        "but this python is too old to have "
-                        "email.MIMEMultipart . Please upgrade to python-2.3 "
-                        "or newer to enable addLogs=True")
+                twlog.msg("warning: I want to send mail with attachments, "
+                          "but this python is too old to have "
+                          "email.MIMEMultipart . Please upgrade to python-2.3 "
+                          "or newer to enable addLogs=True")
 
         if haveAttachments and canDoAttachments:
             m = MIMEMultipart()
@@ -350,7 +350,7 @@
     def sendMessage(self, m, recipients):
         s = m.as_string()
         ds = []
-        log.msg("sending mail (%d bytes) to" % len(s), recipients)
+        twlog.msg("sending mail (%d bytes) to" % len(s), recipients)
         for recip in recipients:
             ds.append(sendmail(self.relayhost, self.fromaddr, recip, s))
         return defer.DeferredList(ds)





More information about the Commits mailing list