PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/silverlining/server-root/var/www/default-disabled/main.py

https://bitbucket.org/ianb/silverlining/
Python | 13 lines | 11 code | 2 blank | 0 comment | 0 complexity | e8ecd4e53b6cf754c467dc6c3709c5d2 MD5 | raw file
 1import os
 2
 3fp = open(os.path.join(os.path.dirname(__file__), 'static', 'disabled.html'), 'rb')
 4disabled = fp.read()
 5fp.close()
 6
 7def application(environ, start_response):
 8    start_response('503 Service Unavailable', 
 9                   [('Content-type', 'text/html; charset=UTF-8'),
10                    ('Content-Length', str(len(disabled))),
11                    ('Cache-Control', 'no-store, no-cache, max-age=0'),
12                    ('Pragma', 'no-cache')])
13    return [disabled]