changeset 200:c1c804aae348

use a tuple not iterate over a string * also, try to find the firefox binary
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 02 Feb 2011 15:30:34 -0800
parents 38fc07fb6aad
children 05ecc0bc7757
files autobot/config.py autobot/process/factory.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/config.py	Wed Feb 02 15:15:38 2011 -0800
+++ b/autobot/config.py	Wed Feb 02 15:30:34 2011 -0800
@@ -48,7 +48,7 @@
 
                 # get platform information
                 platform = {}
-                for key in 'os':
+                for key in ('os',):
                     if key in slave_dict:
                         platform[key] = slave_dict.pop(key)
                     else:
--- a/autobot/process/factory.py	Wed Feb 02 15:15:38 2011 -0800
+++ b/autobot/process/factory.py	Wed Feb 02 15:30:34 2011 -0800
@@ -29,7 +29,7 @@
   def __init__(self, platform, base_url=None):
 
     # must have the os specified!
-    assert platform.get('os'), "platform['os'] must be one of (linux, win, mac)"
+    assert platform.get('os'), "platform['os'] must be one of (linux, win, mac); you have %s" % platform
 
     # determine the (damn) url
     script = 'get-latest-tinderbox'
@@ -69,6 +69,10 @@
                                          WithProperties('%(firefox_bundle)s')],
                                 haltOnFailure=True
                                 ))
+      self.addStep(SetProperty(property='firefox',
+                               command=['python', '-c',
+                                        'import os; print os.path.abspath("firefox/firefox")']))
+      
     else:
       raise NotImplementedError("FirefoxDownloader doesn't know how to work with your os: %s" % platform['os'])