[Buildbot-devel] can't figure out exception in new-style steps

Vitali vlovich at gmail.com
Mon Oct 6 01:23:36 UTC 2014


I'm trying to create a very basic new-style step & I think it might work, but
the logs throw an exception when I view them.

Can anyone give me a pointer to what I'm doing wrong (I think I'm following
the manual)?

Buildbot 0.8.9 on OS X with python 2.7

class MyStep(BuildStep, ShellMixin):
    def __init__(self, script, **kwargs):
        self._script = script
        kwargs = self.setupShellMixin(kwargs,prohibitArgs=['command'])
        BuildStep.__init__(self, **kwargs)

    def run(self):
        cmd = yield self.makeRemoteShellCommand(command=[self._script],
        yield self.runCommand(cmd)
        if cmd.didFail():
        // do something with cmd.stdout

When I add MyStep to my factory, the stdio log file contains the exception below


web.Server Traceback (most recent call last):
 exceptions.AssertionError: not available in new-style steps
  <python framework>/Extras/lib/python/twisted/web/server.py:189 in process
    188                              self._encoder = encoder
    189                      self.render(resrc)
    190                  except:

  <python framework>/Extras/lib/python/twisted/web/server.py:238 in render
    237                  try:
    238                      body = resrc.render(self)
    239                  except UnsupportedMethod as e:

  <python framework>/Extras/lib/python/twisted/web/resource.py:250 in render
    249                      raise UnsupportedMethod(allowedMethods)
    250                  return m(request)

  <packages>/site-packages/buildbot/status/web/logs.py:140 in render_GET
     140         self.original.subscribeConsumer(ChunkConsumer(req, self))
     141         return server.NOT_DONE_YET

   <packages>/buildbot/status/logfile.py:436 in subscribeConsumer
     435 def subscribeConsumer(self, consumer):
     436 assert not self._isNewStyle, "not available in new-style steps"
     437 p = LogFileProducer(self, consumer)
  exceptions.AssertionError: not available in new-style steps

More information about the devel mailing list