"Fossies" - the Fresh Open Source Software Archive

Member "buildbot-2.5.1/buildbot/status/event.py" (24 Nov 2019, 1158 Bytes) of package /linux/misc/buildbot-2.5.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "event.py" see the Fossies "Dox" file reference documentation.

    1 # This file is part of Buildbot.  Buildbot is free software: you can
    2 # redistribute it and/or modify it under the terms of the GNU General Public
    3 # License as published by the Free Software Foundation, version 2.
    4 #
    5 # This program is distributed in the hope that it will be useful, but WITHOUT
    6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    7 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    8 # details.
    9 #
   10 # You should have received a copy of the GNU General Public License along with
   11 # this program; if not, write to the Free Software Foundation, Inc., 51
   12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   13 #
   14 # Copyright Buildbot Team Members
   15 
   16 
   17 from zope.interface import implementer
   18 
   19 from buildbot import interfaces
   20 from buildbot import util
   21 
   22 
   23 @implementer(interfaces.IStatusEvent)
   24 class Event:
   25 
   26     started = None
   27     finished = None
   28     text = []
   29 
   30     # IStatusEvent methods
   31     def getTimes(self):
   32         return (self.started, self.finished)
   33 
   34     def getText(self):
   35         return self.text
   36 
   37     def getLogs(self):
   38         return []
   39 
   40     def finish(self):
   41         self.finished = util.now()