Mercurial > hg > autobot
changeset 85:65c91bf35a36
deal with port defaults
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 12 Jan 2011 11:17:03 -0800 |
parents | 86e65422f31a |
children | 2616a5f49bd3 |
files | autobot/config.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/autobot/config.py Wed Jan 12 11:13:52 2011 -0800 +++ b/autobot/config.py Wed Jan 12 11:17:03 2011 -0800 @@ -19,9 +19,10 @@ # get global information master = ':master:' self.master = self.section_dict(master) - for port in 'slaveport', 'htmlport': - self.master[port] = int(self.master.get(port) or 9010) - + for port, default in ('slaveport', 9010), ('htmlport', 8010) + self.master[port] = int(self.master.get(port) or default) + + # get section information self.slaves = {} self.args = {} for section in self.parser.sections():