[Buildbot-devel] [SOLVED] Re: problem after upgrade 0.8.6 to 0.8.7
Jean-Michel Beuken
jean-michel.beuken at uclouvain.be
Sat Mar 23 09:51:46 UTC 2013
sorry for the spam : I was a little freaked out :-[
solution ( more elegant ...) :
---------------------------------------------
class ReportStatusAbiauty(ShellCommand):
def start(self):
abiautystat = self.getProperty('abiautystat')
if abiautystat == 2:
cmd2 = "echo 'ABIAUTY = FAILED' > abiauty.status"
elif abiautystat == 0:
cmd2 = "echo 'ABIAUTY = SUCCESS' > abiauty.status"
else:
cmd2 = "echo 'ABIAUTY = WARNING' > abiauty.status"
self.setCommand(cmd2)
ShellCommand.start(self)
---------------------------------------------
thank you very much for this great software !
regards
jmb
On 23/03/2013 08:59, Jean-Michel Beuken wrote:
> Hi,
>
> since the upgrade, this code doesn't work ( it seems that it's a code from 0.7.12 :-[ ):
>
> ---------------------------------------------
> class ReportStatusAbiauty(ShellCommand):
> def __init__(self, **kwargs):
> ShellCommand.__init__(self, **kwargs)
>
> def start(self):
> properties = self.build.getProperties()
> warnings = []
> abiautystat = self.getProperty('abiautystat')
> if abiautystat == 2:
> cmd2 = WithProperties("echo 'ABIAUTY = FAILED' > abiauty.status")
> elif abiautystat == 0:
> cmd2 = WithProperties("echo 'ABIAUTY = SUCCESS' > abiauty.status")
> else:
> cmd2 = WithProperties("echo 'ABIAUTY = WARNING' > abiauty.status")
> self.setCommand(cmd2)
> # create the actual RemoteShellCommand instance now
> kwargs = properties.render(self.remote_kwargs)
> *kwargs['command'] = properties.render(self.command)*
> cmd = RemoteShellCommand(**kwargs)
>
> self.setupEnvironment(cmd)
> self.startCommand(cmd, warnings)
> ---------------------------------------------
>
>
> ---------------------------------------------
> Traceback (most recent call last):
> File "/opt/python2.7/lib/python2.7/site-packages/twisted/internet/defer.py", line 576, in _runCallbacks
> current.result = callback(current.result, *args, **kw)
> File "/opt/python2.7/lib/python2.7/site-packages/twisted/internet/defer.py", line 1214, in unwindGenerator
> return _inlineCallbacks(None, gen, Deferred())
> File "/opt/python2.7/lib/python2.7/site-packages/twisted/internet/defer.py", line 1071, in _inlineCallbacks
> result = g.send(result)
> File "/opt/python2.7/lib/python2.7/site-packages/buildbot/process/buildstep.py", line 600, in _startStep_3
> result = yield defer.maybeDeferred(self.start)
> --- <exception caught here> ---
> File "/opt/python2.7/lib/python2.7/site-packages/twisted/internet/defer.py", line 138, in maybeDeferred
> result = f(*args, **kw)
> File "shiva_gcc45_abiauty.cfg", line 42, in start
> # kwargs['command'] = properties.render(self.command)
> exceptions.AttributeError: DeferredList instance has no attribute '__setitem__'
> ---------------------------------------------
>
> can you help me ?
>
> regards
>
> jmb
>
>
> --
>
> ----------------------------------------------------
>
> Jean-Michel Beuken
>
> Computer Scientist
>
> Software Engineer for ETSF and ABINIT.ORG
>
>
> Université catholique de Louvain
>
> pôle NAPS/IMCN (ex-PCPM), Bat. SC17
>
> 8, Chemin des étoiles, Bt L7.03.01
>
> 1348 Louvain-la-Neuve BELGIUM
>
> ----------------------------------------------------
>
> Tel : (3210) 473570 Fax : (3210) 473102
>
> http://www.uclouvain.be/jean-michel.beuken
>
> ----------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
>
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130323/eb6de167/attachment.html>
More information about the devel
mailing list