[Buildbot-commits] buildbot/buildbot/status builder.py,1.77,1.78 mail.py,1.23,1.24

Brian Warner warner at users.sourceforge.net
Mon Apr 17 19:22:36 UTC 2006


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

Modified Files:
	builder.py mail.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-500
Creator:  Brian Warner <warner at lothar.com>

fix process_twisted.py factories, other style changes

	* all: use isinstance() instead of 'type(x) is foo', suggested by
	Neal Norwitz

	* buildbot/process/process_twisted.py (QuickTwistedBuildFactory):
	oops, fix a brain-fade from the other week, when making the
	addStep changes. I changed all the __init__ upcalls to use the
	wrong superclass name.
	(FullTwistedBuildFactory.__init__): same
	(TwistedDebsBuildFactory.__init__): same
	(TwistedReactorsBuildFactory.__init__): same
	(TwistedBuild.isFileImportant): use .startswith for clarity,
	thanks to Neal Norwitz for the suggestions.


Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- builder.py	16 Apr 2006 23:05:41 -0000	1.77
+++ builder.py	17 Apr 2006 19:22:34 -0000	1.78
@@ -539,7 +539,7 @@
         __implements__ = interfaces.ITestResult,
 
     def __init__(self, name, results, text, logs):
-        assert type(name) is tuple
+        assert isinstance(name, tuple)
         self.name = name
         self.results = results
         self.text = text
@@ -1115,7 +1115,7 @@
         self.slavename = slavename
 
     def setText(self, text):
-        assert type(text) in (list, tuple)
+        assert isinstance(text, (list, tuple))
         self.text = text
     def setColor(self, color):
         self.color = color

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mail.py	15 Nov 2005 08:41:21 -0000	1.23
+++ mail.py	17 Apr 2006 19:22:34 -0000	1.24
@@ -140,9 +140,9 @@
         """
 
         base.StatusReceiverMultiService.__init__(self)
-        assert type(extraRecipients) in (list, tuple)
+        assert isinstance(extraRecipients, (list, tuple))
         for r in extraRecipients:
-            assert type(r) is str
+            assert isinstance(r, str)
             assert "@" in r # require full email addresses, not User names
         self.extraRecipients = extraRecipients
         self.sendToInterestedUsers = sendToInterestedUsers





More information about the Commits mailing list