comparison autobot/projects/__init__.py @ 131:a14d466c843b

fix syntax error and note import errors in projects
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 23 Jan 2011 11:15:43 -0800
parents a1568668175c
children 1abbe826d0f3
comparison
equal deleted inserted replaced
130:7d0a4c2cd171 131:a14d466c843b
1 """ 1 """
2 projects that need some testing: 2 projects that need some testing:
3 3
4 * logparser [WORKING] 4 * logparser [WORKING]
5 * autobot [IN FLIGHT]
5 * mozmill [IN FLIGHT] 6 * mozmill [IN FLIGHT]
6 * devicemanager [IN FLIGHT] 7 * devicemanager [IN FLIGHT]
7 * profilemanager [IN FLIGHT] 8 * profilemanager [IN FLIGHT]
8 * firebug [TODO] 9 * firebug [TODO]
9 * jetpack thing [TODO] 10 * jetpack thing [TODO]
10 * autobot [TODO]
11 """ 11 """
12 12
13 import imp 13 import imp
14 import os 14 import os
15 import sys
15 from buildbot.process.factory import BuildFactory 16 from buildbot.process.factory import BuildFactory
16 from logparser import TestLogParserFactory 17 from logparser import TestLogParserFactory
17 from mozmill import TestMozmillFactory 18 from mozmill import TestMozmillFactory
18 19
19 # available factories:: 20 # available factories::
28 if os.path.exists(os.path.join(package, '__init__.py'))] 29 if os.path.exists(os.path.join(package, '__init__.py'))]
29 for package in packages: 30 for package in packages:
30 try: 31 try:
31 module = imp.load_package('autobot.projects.'+package, imp.find_module(package, [here])[1]) 32 module = imp.load_package('autobot.projects.'+package, imp.find_module(package, [here])[1])
32 except: 33 except:
34 print >> sys.stderr, "Could not import autobot.projects." + package
33 continue 35 continue
34 for attr in dir(module): 36 for attr in dir(module):
35 try: 37 try:
36 _obj = getattr(module, attr) 38 _obj = getattr(module, attr)
37 if issubclass(_obj, BuildFactory) and _obj.__module__.startswith('autobot.projects.'): 39 if issubclass(_obj, BuildFactory) and _obj.__module__.startswith('autobot.projects.'):