comparison talosnames/web.py @ 22:82d15f93cc4a

wip
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 10 Jul 2012 19:04:23 -0700
parents 48b4c926be73
children 56d267d847e1
comparison
equal deleted inserted replaced
21:48b4c926be73 22:82d15f93cc4a
3 """ 3 """
4 web handler for talosnames 4 web handler for talosnames
5 """ 5 """
6 6
7 import os 7 import os
8 import pprint
8 import tempita 9 import tempita
9 from api import TalosNames 10 from api import TalosNames
10 from webob import Request, Response, exc 11 from webob import Request, Response, exc
11 12
12 here = os.path.dirname(os.path.abspath(__file__)) 13 here = os.path.dirname(os.path.abspath(__file__))
37 38
38 data = {'suites': suites, 39 data = {'suites': suites,
39 'commands': self.api.buildbot_commands, 40 'commands': self.api.buildbot_commands,
40 'tbpl': dict([(suite, self.api.tbpl_name(suite)) 41 'tbpl': dict([(suite, self.api.tbpl_name(suite))
41 for suite in suites]), 42 for suite in suites]),
42 'tests': tests 43 'tests': tests,
44 'pprint': pprint.pformat
43 } 45 }
44 return template.substitute(data) 46 return template.substitute(data)
45 47
46 if __name__ == '__main__': 48 if __name__ == '__main__':
47 from wsgiref import simple_server 49 from wsgiref import simple_server