Package buildbot :: Package scripts :: Module restart
[frames] | no frames]

Source Code for Module buildbot.scripts.restart

 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  from __future__ import with_statement 
17   
18  from buildbot.scripts import base, stop, start 
19   
20 -def restart(config):
21 basedir = config['basedir'] 22 quiet = config['quiet'] 23 24 if not base.isBuildmasterDir(basedir): 25 print "not a buildmaster directory" 26 return 1 27 28 if stop.stop(config, wait=True) != 0: 29 return 1 30 if not quiet: 31 print "now restarting buildbot process.." 32 return start.start(config)
33