Mercurial > hg > autobot
diff autobot/projects/__init__.py @ 34:206467b6f61f
* cleanup a bit in projects and start featuring autodiscovery
* add some authz crap to the config file
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 08 Jan 2011 10:21:54 -0800 |
parents | 5b08b98897c6 |
children | f586e28ff3d7 |
line wrap: on
line diff
--- a/autobot/projects/__init__.py Fri Jan 07 18:52:36 2011 -0800 +++ b/autobot/projects/__init__.py Sat Jan 08 10:21:54 2011 -0800 @@ -15,7 +15,13 @@ from logparser import TestLogParserFactory from mozmill import TestMozmillFactory # TODO: import these automagically: -# here = os.path.dirname(os.path.abspath(__file__)) +# requires non-zipped eggs +here = os.path.dirname(os.path.abspath(__file__)) +packages = [os.path.join(here, path) + for path in os.listdir(here) + if os.path.isdir(os.path.join(here, path))] +packages = [package for package in packages + if os.path.exists(os.path.join(package, '__init__.py'))] # available factories factories = {'logparser': TestLogParserFactory(),