Ticket #251: buildbot_colors.diff

File buildbot_colors.diff, 30.1 kB (added by nhemingway, 9 months ago)

darcs diff -u removing color from all but presentation code

  • old-buildbot_colors/buildbot/changes/changes.py

    old new  
    128128 
    129129    def getText(self): 
    130130        return [html.escape(self.who)] 
    131     def getColor(self): 
    132         return "white" 
    133131    def getLogs(self): 
    134132        return {} 
    135133 
  • old-buildbot_colors/buildbot/clients/gtkPanes.py

    old new  
    1616from buildbot.clients.base import TextClient 
    1717from buildbot.util import now 
    1818 
     19from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION 
     20 
    1921''' 
    2022class Pane: 
    2123    def __init__(self): 
     
    329331    def gotLastBuild(self, build): 
    330332        if build: 
    331333            build.callRemote("getText").addCallback(self.gotLastText) 
    332             build.callRemote("getColor").addCallback(self.gotLastColor
     334            build.callRemote("getResults").addCallback(self.gotLastResult
    333335 
    334336    def gotLastText(self, text): 
     337        print "Got text", text 
    335338        self.last.setText("\n".join(text)) 
    336     def gotLastColor(self, color): 
    337         self.last.setColor(color) 
     339 
     340    def gotLastResult(self, result): 
     341        colormap = {SUCCESS: 'green', 
     342                    FAILURE: 'red', 
     343                    WARNINGS: 'orange', 
     344                    EXCEPTION: 'purple', 
     345                    } 
     346        self.last.setColor(colormap[result]) 
    338347 
    339348    def getState(self): 
    340349        self.ref.callRemote("getState").addCallback(self.gotState) 
  • old-buildbot_colors/buildbot/interfaces.py

    old new  
    529529        available, the caller should join them together with spaces before 
    530530        presenting them to the user.""" 
    531531 
    532     def getColor(): 
    533         """Returns a single string with the color that should be used to 
    534         display the build. 'green', 'orange', or 'red' are the most likely 
    535         ones.""" 
    536  
    537532    def getResults(): 
    538533        """Return a constant describing the results of the build: one of the 
    539534        constants in buildbot.status.builder: SUCCESS, WARNINGS, or 
     
    654649        available, the caller should join them together with spaces before 
    655650        presenting them to the user.""" 
    656651 
    657     def getColor(): 
    658         """Returns a single string with the color that should be used to 
    659         display this step. 'green', 'orange', 'red' and 'yellow' are the 
    660         most likely ones.""" 
    661  
    662652    def getResults(): 
    663653        """Return a tuple describing the results of the step: (result, 
    664654        strings). 'result' is one of the constants in 
     
    697687        available, the caller should join them together with spaces before 
    698688        presenting them to the user.""" 
    699689 
    700     def getColor(): 
    701         """Returns a single string with the color that should be used to 
    702         display this event. 'red' and 'yellow' are the most likely ones.""" 
    703  
    704690 
    705691LOG_CHANNEL_STDOUT = 0 
    706692LOG_CHANNEL_STDERR = 1 
  • old-buildbot_colors/buildbot/process/base.py

    old new  
    307307            log.msg("Build.setupBuild failed") 
    308308            log.err(Failure()) 
    309309            self.builder.builder_status.addPointEvent(["setupBuild", 
    310                                                        "exception"], 
    311                                                       color="purple") 
     310                                                       "exception"]) 
    312311            self.finished = True 
    313312            self.results = FAILURE 
    314313            self.deferred = None 
     
    499498                # XXX: really .fail or something 
    500499                self.currentStep.progress.finish() 
    501500            text = ["stopped", reason] 
    502             self.buildFinished(text, "red", FAILURE) 
     501            self.buildFinished(text, FAILURE) 
    503502 
    504503    def allStepsDone(self): 
    505504        if self.result == FAILURE: 
    506             color = "red" 
    507505            text = ["failed"] 
    508506        elif self.result == WARNINGS: 
    509             color = "orange" 
    510507            text = ["warnings"] 
    511508        elif self.result == EXCEPTION: 
    512             color = "purple" 
    513509            text = ["exception"] 
    514510        else: 
    515             color = "green" 
    516511            text = ["build", "successful"] 
    517512        text.extend(self.text) 
    518         return self.buildFinished(text, color, self.result) 
     513        return self.buildFinished(text, self.result) 
    519514 
    520515    def buildException(self, why): 
    521516        log.msg("%s.buildException" % self) 
    522517        log.err(why) 
    523         self.buildFinished(["build", "exception"], "purple", FAILURE) 
     518        self.buildFinished(["build", "exception"], FAILURE) 
    524519 
    525     def buildFinished(self, text, color, results): 
     520    def buildFinished(self, text, results): 
    526521        """This method must be called when the last Step has completed. It 
    527522        marks the Build as complete and returns the Builder to the 'idle' 
    528523        state. 
    529524 
    530         It takes three arguments which describe the overall build status: 
    531         text, color, results. 'results' is one of SUCCESS, WARNINGS, or 
    532         FAILURE. 
     525        It takes two arguments which describe the overall build status: 
     526        text, results. 'results' is one of SUCCESS, WARNINGS, or FAILURE. 
    533527 
    534528        If 'results' is SUCCESS or WARNINGS, we will permit any dependant 
    535529        builds to start. If it is 'FAILURE', those builds will be 
     
    542536 
    543537        log.msg(" %s: build finished" % self) 
    544538        self.build_status.setText(text) 
    545         self.build_status.setColor(color) 
    546539        self.build_status.setResults(results) 
    547540        self.build_status.buildFinished() 
    548541        if self.progress: 
  • old-buildbot_colors/buildbot/process/builder.py

    old new  
    131131        self.ping_watchers.append(d) 
    132132        if newping: 
    133133            if status: 
    134                 event = status.addEvent(["pinging"], "yellow"
     134                event = status.addEvent(["pinging"]
    135135                d2 = defer.Deferred() 
    136136                d2.addCallback(self._pong_status, event) 
    137137                self.ping_watchers.insert(0, d2) 
     
    149149    def _pong_status(self, res, event): 
    150150        if res: 
    151151            event.text = ["ping", "success"] 
    152             event.color = "green" 
    153152        else: 
    154153            event.text = ["ping", "failed"] 
    155             event.color = "red" 
    156154        event.finish() 
    157155 
    158156class Ping: 
  • old-buildbot_colors/buildbot/process/buildstep.py

    old new  
    719719        As the step runs, it should send status information to the 
    720720        BuildStepStatus:: 
    721721 
    722           self.step_status.setColor('red') 
    723722          self.step_status.setText(['compile', 'failed']) 
    724723          self.step_status.setText2(['4', 'warnings']) 
    725724 
     
    792791            self.addHTMLLog("err.html", formatFailure(why)) 
    793792            self.addCompleteLog("err.text", why.getTraceback()) 
    794793            # could use why.getDetailedTraceback() for more information 
    795             self.step_status.setColor("purple") 
    796794            self.step_status.setText([self.name, "exception"]) 
    797795            self.step_status.setText2([self.name]) 
    798796            self.step_status.stepFinished(EXCEPTION) 
     
    946944        """ 
    947945        log.msg("ShellCommand.startCommand(cmd=%s)", (cmd,)) 
    948946        self.cmd = cmd # so we can interrupt it 
    949         self.step_status.setColor("yellow") 
    950947        self.step_status.setText(self.describe(False)) 
    951948 
    952949        # stdio is the first log 
     
    991988 
    992989    def checkDisconnect(self, f): 
    993990        f.trap(error.ConnectionLost) 
    994         self.step_status.setColor("red") 
    995991        self.step_status.setText(self.describe(True) + 
    996992                                 ["failed", "slave", "lost"]) 
    997993        self.step_status.setText2(["failed", "slave", "lost"]) 
     
    10761072                return self.getText2(cmd, results) 
    10771073        return [] 
    10781074 
    1079     def getColor(self, cmd, results): 
    1080         assert results in (SUCCESS, WARNINGS, FAILURE) 
    1081         if results == SUCCESS: 
    1082             return "green" 
    1083         elif results == WARNINGS: 
    1084             return "orange" 
    1085         else: 
    1086             return "red" 
    1087  
    10881075    def setStatus(self, cmd, results): 
    10891076        # this is good enough for most steps, but it can be overridden to 
    10901077        # get more control over the displayed text 
    1091         self.step_status.setColor(self.getColor(cmd, results)) 
    10921078        self.step_status.setText(self.getText(cmd, results)) 
    10931079        self.step_status.setText2(self.maybeGetText2(cmd, results)) 
    10941080 
  • old-buildbot_colors/buildbot/process/step_twisted2.py

    old new  
    141141    def finishStatus(self, result): 
    142142        total = self.results.countTests() 
    143143        count = self.results.countFailures() 
    144         color = "green" 
    145144        text = [] 
    146145        if count == 0: 
    147146            text.extend(["%d %s" % \ 
     
    153152            text.append("%d %s" % \ 
    154153                        (count, 
    155154                         count == 1 and "failure" or "failures")) 
    156             color = "red" 
    157         self.updateCurrentActivity(color=color, text=text) 
     155        self.updateCurrentActivity(text=text) 
    158156        self.addFileToCurrentActivity("tests", self.results) 
    159157        #self.finishStatusSummary() 
    160158        self.finishCurrentActivity() 
  • old-buildbot_colors/buildbot/status/builder.py

    old new  
    502502    started = None 
    503503    finished = None 
    504504    text = [] 
    505     color = None 
    506505 
    507506    # IStatusEvent methods 
    508507    def getTimes(self): 
    509508        return (self.started, self.finished) 
    510509    def getText(self): 
    511510        return self.text 
    512     def getColor(self): 
    513         return self.color 
    514511    def getLogs(self): 
    515512        return [] 
    516513 
     
    641638    I represent a collection of output status for a 
    642639    L{buildbot.process.step.BuildStep}. 
    643640 
    644     @type color: string 
    645     @cvar color: color that this step feels best represents its 
    646                  current mood. yellow,green,red,orange are the 
    647                  most likely choices, although purple indicates 
    648                  an exception 
    649641    @type progress: L{buildbot.status.progress.StepProgress} 
    650642    @cvar progress: tracks ETA for the step 
    651643    @type text: list of strings 
     
    664656    finished = None 
    665657    progress = None 
    666658    text = [] 
    667     color = None 
    668659    results = (None, []) 
    669660    text2 = [] 
    670661    watchers = [] 
     
    742733        presenting them to the user.""" 
    743734        return self.text 
    744735 
    745     def getColor(self): 
    746         """Returns a single string with the color that should be used to 
    747         display this step. 'green', 'orange', 'red', 'yellow' and 'purple' 
    748         are the most likely ones.""" 
    749         return self.color 
    750  
    751736    def getResults(self): 
    752737        """Return a tuple describing the results of the step. 
    753738        'result' is one of the constants in L{buildbot.status.builder}: 
     
    839824    def addURL(self, name, url): 
    840825        self.urls[name] = url 
    841826 
    842     def setColor(self, color): 
    843         self.color = color 
    844827    def setText(self, text): 
    845828        self.text = text 
    846829    def setText2(self, text): 
     
    899882    finished = None 
    900883    currentStep = None 
    901884    text = [] 
    902     color = None 
    903885    results = None 
    904886    slavename = "???" 
    905887 
     
    1011993            text.extend(s.text2) 
    1012994        return text 
    1013995 
    1014     def getColor(self): 
    1015         return self.color 
    1016  
    1017996    def getResults(self): 
    1018997        return self.results 
    1019998 
     
    11061085    def setText(self, text): 
    11071086        assert isinstance(text, (list, tuple)) 
    11081087        self.text = text 
    1109     def setColor(self, color): 
    1110         self.color = color 
    11111088    def setResults(self, results): 
    11121089        self.results = results 
    11131090 
     
    15501527    def setSlavenames(self, names): 
    15511528        self.slavenames = names 
    15521529 
    1553     def addEvent(self, text=[], color=None): 
     1530    def addEvent(self, text=[]): 
    15541531        # this adds a duration event. When it is done, the user should call 
    1555         # e.finish(). They can also mangle it by modifying .text and .color 
     1532        # e.finish(). They can also mangle it by modifying .text 
    15561533        e = Event() 
    15571534        e.started = util.now() 
    15581535        e.text = text 
    1559         e.color = color 
    15601536        self.events.append(e) 
    15611537        return e # they are free to mangle it further 
    15621538 
    1563     def addPointEvent(self, text=[], color=None): 
     1539    def addPointEvent(self, text=[]): 
    15641540        # this adds a point event, one which occurs as a single atomic 
    15651541        # instant of time. 
    15661542        e = Event() 
    15671543        e.started = util.now() 
    15681544        e.finished = 0 
    15691545        e.text = text 
    1570         e.color = color 
    15711546        self.events.append(e) 
    15721547        return e # for consistency, but they really shouldn't touch it 
    15731548 
  • old-buildbot_colors/buildbot/status/client.py

    old new  
    175175    def remote_getText(self): 
    176176        return self.b.getText() 
    177177 
    178     def remote_getColor(self): 
    179         return self.b.getColor() 
    180  
    181178    def remote_getResults(self): 
    182179        return self.b.getResults() 
    183180 
     
    267264    def remote_getText(self): 
    268265        return self.s.getText() 
    269266 
    270     def remote_getColor(self): 
    271         return self.s.getColor() 
    272  
    273267    def remote_getResults(self): 
    274268        return self.s.getResults() 
    275269 
     
    300294        return self.s.getTimes() 
    301295    def remote_getText(self): 
    302296        return self.s.getText() 
    303     def remote_getColor(self): 
    304         return self.s.getColor() 
    305297 
    306298components.registerAdapter(RemoteEvent, 
    307299                           interfaces.IStatusEvent, IRemote) 
  • old-buildbot_colors/buildbot/status/web/base.py

    old new  
    8989                 "<input type='text' name='revision' />") 
    9090      + '<input type="submit" value="Force Build" /></form>\n') 
    9191 
    92 colormap = { 
    93     'green': '#72ff75', 
    94     } 
    9592def td(text="", parms={}, **props): 
    9693    data = "" 
    9794    data += "  " 
    9895    #if not props.has_key("border"): 
    9996    #    props["border"] = 1 
    10097    props.update(parms) 
    101     if props.has_key("bgcolor"): 
    102         props["bgcolor"] = colormap.get(props["bgcolor"], props["bgcolor"]) 
    10398    comment = props.get("comment", None) 
    10499    if comment: 
    105100        data += "<!-- %s -->" % comment 
     
    107102    class_ = props.get('class_', None) 
    108103    if class_: 
    109104        props["class"] = class_ 
    110     for prop in ("align", "bgcolor", "colspan", "rowspan", "border", 
     105    for prop in ("align", "colspan", "rowspan", "border", 
    111106                 "valign", "halign", "class"): 
    112107        p = props.get(prop, None) 
    113108        if p != None: 
     
    175170    # lack, and it has a base URL to which each File's name is relative. 
    176171    # Events don't know about HTML. 
    177172    spacer = False 
    178     def __init__(self, text=[], color=None, class_=None, urlbase=None, 
     173    def __init__(self, text=[], class_=None, urlbase=None, 
    179174                 **parms): 
    180175        self.text = text 
    181         self.color = color 
    182176        self.class_ = class_ 
    183177        self.urlbase = urlbase 
    184178        self.show_idle = 0 
     
    195189        text = self.text 
    196190        if not text and self.show_idle: 
    197191            text = ["[idle]"] 
    198         return td(text, props, bgcolor=self.color, class_=self.class_) 
     192        return td(text, props, class_=self.class_) 
    199193 
    200194 
    201195class HtmlResource(resource.Resource): 
  • old-buildbot_colors/buildbot/status/web/baseweb.py

    old new  
    213213                    label = "#%d" % b.getNumber() 
    214214                text = ['<a href="%s">%s</a>' % (url, label)] 
    215215                text.extend(b.getText()) 
    216                 box = Box(text, b.getColor(), 
     216                box = Box(text, 
    217217                          class_="LastBuild box %s" % build_get_class(b)) 
    218218                data += box.td(align="center") 
    219219            else: 
  • old-buildbot_colors/buildbot/status/web/build.py

    old new  
    3232        projectName = status.getProjectName() 
    3333        data = ('<div class="title"><a href="%s">%s</a></div>\n' 
    3434                % (self.path_to_root(req), projectName)) 
    35         # the color in the following line gives python-mode trouble 
    3635        builder_name = b.getBuilder().getName() 
    3736        data += ("<h1><a href=\"%s\">Builder %s</a>: Build #%d</h1>\n" 
    3837                 % (path_to_builder(req, b.getBuilder()), 
  • old-buildbot_colors/buildbot/status/web/changes.py

    old new  
    3636    def getBox(self, req): 
    3737        url = req.childLink("../changes/%d" % self.original.number) 
    3838        text = self.original.get_HTML_box(url) 
    39         return Box([text], color="white", class_="Change") 
     39        return Box([text], class_="Change") 
    4040components.registerAdapter(ChangeBox, Change, IBox) 
    4141 
  • old-buildbot_colors/buildbot/status/web/waterfall.py

    old new  
    5555            state = "waiting" 
    5656 
    5757        if state == "building": 
    58             color = "yellow" 
    5958            text = ["building"] 
    6059            if builds: 
    6160                for b in builds: 
    6261                    eta = b.getETA() 
    6362                    text.extend(self.formatETA("ETA in", eta)) 
    6463        elif state == "offline": 
    65             color = "red" 
    6664            text = ["offline"] 
    6765        elif state == "idle": 
    68             color = "white" 
    6966            text = ["idle"] 
    7067        elif state == "waiting": 
    71             color = "yellow" 
    7268            text = ["waiting"] 
    7369        else: 
    7470            # just in case I add a state and forget to update this 
    75             color = "white" 
    7671            text = [state] 
    7772 
    7873        # TODO: for now, this pending/upcoming stuff is in the "current 
     
    8782        for t in upcoming: 
    8883            eta = t - util.now() 
    8984            text.extend(self.formatETA("next in", eta)) 
    90         return Box(text, color=color, class_="Activity " + state) 
     85        return Box(text, class_="Activity " + state) 
    9186 
    9287components.registerAdapter(CurrentBox, builder.BuilderStatus, ICurrentBox) 
    9388 
     
    10499        builds = list(builder.generateFinishedBuilds(map_branches(branches), 
    105100                                                     num_builds=1)) 
    106101        if not builds: 
    107             return Box(["none"], "white", class_="LastBuild") 
     102            return Box(["none"], class_="LastBuild") 
    108103        b = builds[0] 
    109104        name = b.getBuilder().getName() 
    110105        number = b.getNumber() 
     
    112107        text = b.getText() 
    113108        # TODO: maybe add logs? 
    114109        # TODO: add link to the per-build page at 'url' 
    115         c = b.getColor() 
    116110        class_ = build_get_class(b) 
    117         return Box(text, c, class_="LastBuild %s" % class_) 
     111        return Box(text, class_="LastBuild %s" % class_) 
    118112components.registerAdapter(BuildTopBox, builder.BuilderStatus, ITopBox) 
    119113 
    120114class BuildBox(components.Adapter): 
     
    128122        reason = b.getReason() 
    129123        text = ('<a title="Reason: %s" href="%s">Build %d</a>' 
    130124                % (html.escape(reason), url, number)) 
    131         color = "yellow" 
    132125        class_ = "start" 
    133126        if b.isFinished() and not b.getSteps(): 
    134127            # the steps have been pruned, so there won't be any indication 
    135             # of whether it succeeded or failed. Color the box red or green 
    136             # to show its status 
    137             color = b.getColor() 
     128            # of whether it succeeded or failed. 
    138129            class_ = build_get_class(b) 
    139         return Box([text], color=color, class_="BuildStep " + class_) 
     130        return Box([text], class_="BuildStep " + class_) 
    140131components.registerAdapter(BuildBox, builder.BuildStatus, IBox) 
    141132 
    142133class StepBox(components.Adapter): 
     
    162153        for name, target in urls.items(): 
    163154            text.append('[<a href="%s" class="%s">%s</a>]' % 
    164155                        (target, ex_url_class, html.escape(name))) 
    165         color = self.original.getColor() 
    166156        class_ = "BuildStep " + build_get_class(self.original) 
    167         return Box(text, color, class_=class_) 
     157        return Box(text, class_=class_) 
    168158components.registerAdapter(StepBox, builder.BuildStepStatus, IBox) 
    169159 
    170160 
     
    173163 
    174164    def getBox(self, req): 
    175165        text = self.original.getText() 
    176         color = self.original.getColor() 
    177166        class_ = "Event" 
    178         if color: 
    179             class_ += " " + color 
    180         return Box(text, color, class_=class_) 
     167        return Box(text, class_=class_) 
    181168components.registerAdapter(EventBox, builder.Event, IBox) 
    182169         
    183170 
     
    192179        return (self.started, self.finished) 
    193180    def getText(self): 
    194181        return [] 
    195     def getColor(self): 
    196         return None 
    197182 
    198183class SpacerBox(components.Adapter): 
    199184    implements(IBox) 
     
    608593        data += td("", colspan=2) 
    609594        for b in builders: 
    610595            text = "" 
    611             color = "#ca88f7" 
    612596            state, builds = b.getState() 
    613597            if state != "offline": 
    614598                text += "%s<br />\n" % state #b.getCurrentBig().text[0] 
    615599            else: 
    616600                text += "OFFLINE<br />\n" 
    617                 color = "#ffe0e0" 
    618             data += td(text, align="center", bgcolor=color) 
     601            data += td(text, align="center") 
    619602 
    620603        # the next row has the column headers: time, changes, builder names 
    621604        data += " <tr>\n" 
     
    632615        data += td("04:00", align="bottom") 
    633616        data += td("fred", align="center") 
    634617        for name in names: 
    635             data += td("stuff", align="center", bgcolor="red"
     618            data += td("stuff", align="center"
    636619        data += " </tr>\n" 
    637620 
    638621        data += "</table>\n" 
     
    790773                    for e in row[c]: 
    791774                        log.msg("Event", r, c, sourceNames[c], e.getText()) 
    792775                        lognames = [loog.getName() for loog in e.getLogs()] 
    793                         data += "%s: %s: %s %s<br />" % (e.getText(), 
     776                        data += "%s: %s: %s<br />" % (e.getText(), 
    794777                                                         e.getTimes()[0], 
    795                                                          e.getColor(), 
    796778                                                         lognames) 
    797779                else: 
    798780                    data += "<b>%s</b> [none]<br />\n" % sourceNames[c] 
  • old-buildbot_colors/buildbot/steps/dummy.py

    old new  
    2525        self.timer = None 
    2626 
    2727    def start(self): 
    28         self.step_status.setColor("yellow") 
    2928        self.step_status.setText(["delay", "%s secs" % self.timeout]) 
    3029        self.timer = reactor.callLater(self.timeout, self.done) 
    3130 
     
    3332        if self.timer: 
    3433            self.timer.cancel() 
    3534            self.timer = None 
    36             self.step_status.setColor("red") 
    3735            self.step_status.setText(["delay", "interrupted"]) 
    3836            self.finished(FAILURE) 
    3937 
    4038    def done(self): 
    41         self.step_status.setColor("green") 
    4239        self.finished(SUCCESS) 
    4340 
    4441class FailingDummy(Dummy): 
     
    4845    name = "failing dummy" 
    4946 
    5047    def start(self): 
    51         self.step_status.setColor("yellow") 
    5248        self.step_status.setText(["boom", "%s secs" % self.timeout]) 
    5349        self.timer = reactor.callLater(self.timeout, self.done) 
    5450 
    5551    def done(self): 
    56         self.step_status.setColor("red") 
    5752        self.finished(FAILURE) 
    5853 
    5954class RemoteDummy(LoggingBuildStep): 
  • old-buildbot_colors/buildbot/steps/maxq.py

    old new  
    3434 
    3535    def finishStatus(self, result): 
    3636        if self.failures: 
    37             color = "red" 
    3837            text = ["maxq", "failed"] 
    3938        else: 
    40             color = "green" 
    4139            text = ['maxq', 'tests'] 
    42         self.updateCurrentActivity(color=color, text=text) 
     40        self.updateCurrentActivity(text=text) 
    4341        self.finishStatusSummary() 
    4442        self.finishCurrentActivity() 
    4543 
  • old-buildbot_colors/buildbot/steps/source.py

    old new  
    159159    def start(self): 
    160160        if self.notReally: 
    161161            log.msg("faking %s checkout/update" % self.name) 
    162             self.step_status.setColor("green") 
    163162            self.step_status.setText(["fake", self.name, "successful"]) 
    164163            self.addCompleteLog("log", 
    165164                                "Faked %s checkout/update 'successful'\n" \ 
  • old-buildbot_colors/buildbot/steps/transfer.py

    old new  
    125125        log.msg("FileUpload started, from slave %r to master %r" 
    126126                % (source, masterdest)) 
    127127 
    128         self.step_status.setColor('yellow') 
    129128        self.step_status.setText(['uploading', os.path.basename(source)]) 
    130129 
    131130        # we use maxsize to limit the amount of data on both sides 
     
    149148            self.addCompleteLog('stderr', self.cmd.stderr) 
    150149 
    151150        if self.cmd.rc is None or self.cmd.rc == 0: 
    152             self.step_status.setColor('green') 
    153151            return BuildStep.finished(self, SUCCESS) 
    154         self.step_status.setColor('red') 
    155152        return BuildStep.finished(self, FAILURE) 
    156153 
    157154 
     
    250247        log.msg("FileDownload started, from master %r to slave %r" % 
    251248                (source, slavedest)) 
    252249 
    253         self.step_status.setColor('yellow') 
    254250        self.step_status.setText(['downloading', "to", 
    255251                                  os.path.basename(slavedest)]) 
    256252 
     
    286282            self.addCompleteLog('stderr', self.cmd.stderr) 
    287283 
    288284        if self.cmd.rc is None or self.cmd.rc == 0: 
    289             self.step_status.setColor('green') 
    290285            return BuildStep.finished(self, SUCCESS) 
    291         self.step_status.setColor('red') 
    292286        return BuildStep.finished(self, FAILURE) 
    293287 
  • old-buildbot_colors/buildbot/steps/trigger.py

    old new  
    4747    def interrupt(self, reason): 
    4848        # TODO: this doesn't actually do anything. 
    4949        if self.running: 
    50             self.step_status.setColor("red") 
    5150            self.step_status.setText(["interrupted"]) 
    5251 
    5352    def start(self): 
     
    8382                unknown_schedulers.append(scheduler) 
    8483 
    8584        if unknown_schedulers: 
    86             self.step_status.setColor("red") 
    8785            self.step_status.setText(['no scheduler:'] + unknown_schedulers) 
    8886            rc = FAILURE 
    8987        else: 
    9088            rc = SUCCESS 
    9189            self.step_status.setText(['triggered'] + triggered_schedulers) 
    92             if self.waitForFinish: 
    93                 self.step_status.setColor("yellow") 
    94             else: 
    95                 self.step_status.setColor("green") 
    9690 
    9791        if self.waitForFinish: 
    9892            d = defer.DeferredList(dl, consumeErrors=1) 
  • old-buildbot_colors/buildbot/test/test_status.py

    old new  
    920920        self.failUnlessEqual(b.getResponsibleUsers(), []) 
    921921        self.failUnless(b.isFinished()) 
    922922        self.failUnlessEqual(b.getText(), ['build', 'successful']) 
    923         self.failUnlessEqual(b.getColor(), "green") 
    924923        self.failUnlessEqual(b.getResults(), builder.SUCCESS) 
    925924 
    926925        steps = b.getSteps()