~frankban/charms/oneiric/buildbot-master/02-14

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: Francesco Banconi
  • Date: 2012-02-14 11:45:55 UTC
  • Revision ID: francesco.banconi@canonical.com-20120214114555-ejzi9elohn49xy8g
The slaves JSON file is removed in the install hook.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
    uid, gid = get_user_ids('buildbot')
147
147
    os.chown(master_cfg_path, uid, gid)
148
148
    with su('buildbot'):
 
149
        # Initialise the slave JSON if it doesn't exist.
 
150
        if not slave_json.exists():
 
151
            slave_json.set({})
149
152
        placeholder_path = os.path.join(buildbot_dir, 'placeholder.json')
150
153
        if not os.path.exists(placeholder_path):
151
154
            with open(placeholder_path, 'w') as f: