changeset 259:aa36f82313f1

really use no channels, damn system calls
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 28 Dec 2011 16:53:05 -0800
parents 8ed63380052e
children d08050b4c858
files autobot/config.py autobot/projects/autobot/__init__.py autobot/template.py autobot/template/master/master.cfg
diffstat 4 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/config.py	Wed Dec 28 16:44:07 2011 -0800
+++ b/autobot/config.py	Wed Dec 28 16:53:05 2011 -0800
@@ -25,8 +25,8 @@
         self.master = self.section_dict(master)
         for port, default in ('slaveport', 9010), ('htmlport', 8010), ('publichtmlport', 8011):
             self.master[port] = int(self.master.get(port) or default)
-        channels = self.master.get('channels', '').strip()
-        if channels:
+        channels = self.master.get('channels', '-').strip()
+        if channels and channels != '-':
             self.master['channels'] = channels.split()
         else:
             self.master['channels'] = []
--- a/autobot/projects/autobot/__init__.py	Wed Dec 28 16:44:07 2011 -0800
+++ b/autobot/projects/autobot/__init__.py	Wed Dec 28 16:53:05 2011 -0800
@@ -27,7 +27,7 @@
     # make a master, slave pair
     self.addStep(ShellCommand(command=[WithProperties('%(create-autobot)s'),
                                        '-f', '-', # all factories,
-                                       '--ircChannels', '', # no channels
+                                       '--channels', '-', # no channels
                                        '--slaveport', str(slaveport),
                                        '--htmlport', str(htmlport),
                                        'bot'],
@@ -45,7 +45,7 @@
                                        'start', 'slave'],
                               workdir=WithProperties('%(virtualenv)s/bot'),
                               description='start build slave'))
-    
+
 
     # try to access the waterfall
     self.addStep(ShellCommand(command=['curl',
--- a/autobot/template.py	Wed Dec 28 16:44:07 2011 -0800
+++ b/autobot/template.py	Wed Dec 28 16:53:05 2011 -0800
@@ -54,7 +54,7 @@
             Variable('publichtmlport', 'port for public waterfall display', default=8011, cast=int),
             Variable('botname', 'name of IRC bot', default='autobot-test'), # use autobot in production
             Variable('ircHost', 'IRC host', default='irc.mozilla.org'),
-            Variable('ircChannels', 'channels for the IRC bot', default='#ateam-test') # use #ateam in production
+            Variable('ircChannels', 'channels for the IRC bot ("-" for none)', default='#ateam-test') # use #ateam in production
             ]
 
     def pre(self, variables, output):
--- a/autobot/template/master/master.cfg	Wed Dec 28 16:44:07 2011 -0800
+++ b/autobot/template/master/master.cfg	Wed Dec 28 16:53:05 2011 -0800
@@ -117,8 +117,9 @@
 irc = config.master.get('irc', '')
 if '@' in irc and config.master['channels']:
     nick, irc_host = irc.split('@', 1)
-    c['status'].append(words.IRC(host=irc_host, nick=nick,
-                                 channels=config.master['channels']))
+    if nick and irc_host:
+        c['status'].append(words.IRC(host=irc_host, nick=nick,
+                                     channels=config.master['channels']))
 
 
 ####### PROJECT IDENTITY