[80192] contrib/buildbot/master.cfg
wsiegrist at apple.com
wsiegrist at apple.com
Wed Jul 6 08:55:28 PDT 2011
Revision: 80192
http://trac.macports.org/changeset/80192
Author: wsiegrist at apple.com
Date: 2011-07-06 08:55:28 -0700 (Wed, 06 Jul 2011)
Log Message:
-----------
Use with for opening files
Modified Paths:
--------------
contrib/buildbot/master.cfg
Modified: contrib/buildbot/master.cfg
===================================================================
--- contrib/buildbot/master.cfg 2011-07-06 15:37:47 UTC (rev 80191)
+++ contrib/buildbot/master.cfg 2011-07-06 15:55:28 UTC (rev 80192)
@@ -2,6 +2,7 @@
# ex: set syntax=python:
import json
+import os
# This is a buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
@@ -13,8 +14,11 @@
# Master variable to toggle config between testing on your personal system
# (where /opt/local shouldn't be messed with) and the production server (where
# it has to be)
-production = True
+production = False
+with open(os.path.join(os.path.dirname(__file__), 'config.json')) as f:
+ production = json.load(f)['production']
+
####### BUILDSLAVES
# The 'slaves' list defines the set of recognized buildslaves. Each element is
@@ -24,7 +28,9 @@
c['slaves'] = []
if production:
- slavedata = json.load(open('slaves.json'))
+ slavedata = {}
+ with open(os.path.join(os.path.dirname(__file__), 'slaves.json')) as f:
+ slavedata = json.load(f)
for slave, pwd in slavedata.items():
c['slaves'].append(BuildSlave(slave, pwd))
else:
@@ -46,7 +52,9 @@
if production:
from buildbot.changes.pb import PBChangeSource
- sourcedata = json.load(open('source.json'))
+ sourcedata = []
+ with open(os.path.join(os.path.dirname(__file__), 'source.json')) as f:
+ sourcedata = json.load(f)
c['change_source'] = PBChangeSource(user=sourcedata[0], passwd=sourcedata[1])
else:
from buildbot.changes.svnpoller import SVNPoller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110706/a2515948/attachment.html>
More information about the macports-changes
mailing list