[Buildbot-devel] Exception while accessing cmd.log, in a ShellCommand

Carl Dionne cdionne at quazal.com
Thu Nov 9 03:32:05 UTC 2006


I would like to access the output of a shell command, in a step, but it
is failing.  Here is what I am doing:
 
class Status(step.ShellCommand):
    name = "status"
    command = ["set"]
 
    def commandComplete(self, cmd):
        # This should work, and then we should be able to grep the 
        # info we want, but it is failing for some reason, since log 
        # is not found in cmd.  This is equivalent to the TreeSize 
        # step.
        out = cmd.log.getText()
 
    def evaluateCommand(self, cmd):
        return step.SUCCESS            
 
    def getText(self, cmd, results):
        return ["some status info",]
 
When I use this step, I get the following exception.  A similar
exception is also raised in the TreeSize code, from the distribution.
 
Traceback (most recent call last):
  File "c:\tools\python\lib\site-packages\twisted\internet\defer.py",
line 182, in addCallbacks
    self._runCallbacks()
  File "c:\tools\python\lib\site-packages\twisted\internet\defer.py",
line 307, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "c:\tools\python\lib\site-packages\twisted\internet\defer.py",
line 229, in callback
    self._startRunCallbacks(result)
  File "c:\tools\python\lib\site-packages\twisted\internet\defer.py",
line 294, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "c:\tools\python\lib\site-packages\twisted\internet\defer.py",
line 307, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "c:\tools\python\Lib\site-packages\buildbot\process\step.py",
line 924, in <lambda>
    d.addCallback(lambda res: self.commandComplete(cmd))
  File "c:\buildmaster\master.cfg", line 196, in commandComplete
    out = cmd.log.getText()
exceptions.AttributeError: RemoteShellCommand instance has no attribute
'log'
 
- Has anyone seen a similar problem?
- I'm using windows on slave and master.  Is is a limitation of the
windows version?  If so, is it due to the windows slave or the windows
master?
 
Thanks!
 
Carl
 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20061108/6d2933ab/attachment.html>


More information about the devel mailing list