Code review comment for lp://staging/~gary/charms/oneiric/buildbot-master/run-as-buildbot

Revision history for this message
Graham Binns (gmb) wrote :

Hi Gary,

Nice branch; thanks for this. I'll merge it presently with the master trunk.

363 + try:
364 + return subprocess.call(['buildslave', 'start', buildbot_dir])
365 + except OSError:
366 + return subprocess.call(['buildbot', 'start', buildbot_dir])

Instead of this you could do something like this:

    def get_buildslave_command():
        if subprocess.call(['which', 'buildslave']) == 0:
            return 'buildslave'
        else:
            return 'buildbot'

and then call get_buildslave_command() where you need it.

review: Approve

« Back to merge proposal