[Buildbot-commits] buildbot/buildbot/status builder.py, 1.91, 1.92 mail.py, 1.28, 1.29

Brian Warner warner at users.sourceforge.net
Mon Dec 11 08:40:19 UTC 2006


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

Modified Files:
	builder.py mail.py 
Log Message:
[project @ more post-Twisted-1.3.0 cleanup: remove twcompat.providedBy, use zope.interface native methods instead]

Original author: warner at lothar.com
Date: 2006-12-11 08:34:42

Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- builder.py	11 Dec 2006 04:43:22 -0000	1.91
+++ builder.py	11 Dec 2006 08:40:17 -0000	1.92
@@ -20,7 +20,7 @@
 
 # sibling imports
 from buildbot import interfaces, util, sourcestamp
-from buildbot.twcompat import implements, providedBy
+from buildbot.twcompat import implements
 
 SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION = range(5)
 Results = ["success", "warnings", "failure", "skipped", "exception"]
@@ -1791,21 +1791,21 @@
         prefix = self.getBuildbotURL()
         if not prefix:
             return None
-        if providedBy(thing, interfaces.IStatus):
+        if interfaces.IStatus.providedBy(thing):
             return prefix
-        if providedBy(thing, interfaces.ISchedulerStatus):
+        if interfaces.ISchedulerStatus.providedBy(thing):
             pass
-        if providedBy(thing, interfaces.IBuilderStatus):
+        if interfaces.IBuilderStatus.providedBy(thing):
             builder = thing
             return prefix + urllib.quote(builder.getName(), safe='')
-        if providedBy(thing, interfaces.IBuildStatus):
+        if interfaces.IBuildStatus.providedBy(thing):
             build = thing
             builder = build.getBuilder()
             return "%s%s/builds/%d" % (
                 prefix,
                 urllib.quote(builder.getName(), safe=''),
                 build.getNumber())
-        if providedBy(thing, interfaces.IBuildStepStatus):
+        if interfaces.IBuildStepStatus.providedBy(thing):
             step = thing
             build = step.getBuild()
             builder = build.getBuilder()
@@ -1819,14 +1819,14 @@
         # ISlaveStatus
 
         # IStatusEvent
-        if providedBy(thing, interfaces.IStatusEvent):
+        if interfaces.IStatusEvent.providedBy(thing):
             from buildbot.changes import changes
             # TODO: this is goofy, create IChange or something
             if isinstance(thing, changes.Change):
                 change = thing
                 return "%schanges/%d" % (prefix, change.number)
 
-        if providedBy(thing, interfaces.IStatusLog):
+        if interfaces.IStatusLog.providedBy(thing):
             log = thing
             step = log.getStep()
             build = step.getBuild()

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- mail.py	25 Sep 2006 02:43:56 -0000	1.28
+++ mail.py	11 Dec 2006 08:40:17 -0000	1.29
@@ -20,7 +20,7 @@
 from twisted.python import log
 
 from buildbot import interfaces, util
-from buildbot.twcompat import implements, providedBy
+from buildbot.twcompat import implements
 from buildbot.status import base
 from buildbot.status.builder import FAILURE, SUCCESS, WARNINGS
 
@@ -155,7 +155,7 @@
         if lookup is not None:
             if type(lookup) is str:
                 lookup = Domain(lookup)
-            assert providedBy(lookup, interfaces.IEmailLookup)
+            assert interfaces.IEmailLookup.providedBy(lookup)
         self.lookup = lookup
         self.watched = []
         self.status = None





More information about the Commits mailing list