New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 80192


Ignore:
Timestamp:
07/06/11 08:55:28 (4 years ago)
Author:
wsiegrist@…
Message:

Use with for opening files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/buildbot/master.cfg

    r80191 r80192  
    33 
    44import json 
     5import os 
    56 
    67# This is a buildmaster config file. It must be installed as 
     
    1415# (where /opt/local shouldn't be messed with) and the production server (where 
    1516# it has to be) 
    16 production = True 
     17 
     18production = False 
     19with open(os.path.join(os.path.dirname(__file__), 'config.json')) as f: 
     20    production = json.load(f)['production'] 
    1721 
    1822####### BUILDSLAVES 
     
    2529c['slaves'] = [] 
    2630if production: 
    27     slavedata = json.load(open('slaves.json')) 
     31    slavedata = {} 
     32    with open(os.path.join(os.path.dirname(__file__), 'slaves.json')) as f: 
     33        slavedata = json.load(f) 
    2834    for slave, pwd in slavedata.items(): 
    2935        c['slaves'].append(BuildSlave(slave, pwd)) 
     
    4753if production: 
    4854    from buildbot.changes.pb import PBChangeSource 
    49     sourcedata = json.load(open('source.json')) 
     55    sourcedata = [] 
     56    with open(os.path.join(os.path.dirname(__file__), 'source.json')) as f: 
     57        sourcedata = json.load(f) 
    5058    c['change_source'] = PBChangeSource(user=sourcedata[0], passwd=sourcedata[1]) 
    5159else: 
Note: See TracChangeset for help on using the changeset viewer.