~ubuntuone-pqm-team/talisker/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
import pprint


def application(environ, start_response):
    status = '404 Not Found'
    start_response(status, [('content-type', 'text/plain')])
    s = environ['statsd']
    statsd = 'statsd: {} {}'.format(s._addr, s._prefix)
    output = (status + '\n\n' +
              statsd + '\n\n' +
              pprint.pformat(environ))

    return output.encode('utf8')