PageRenderTime 603ms CodeModel.GetById 182ms app.highlight 2ms RepoModel.GetById 269ms app.codeStats 86ms

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

https://bitbucket.org/ianb/silverlining/
Python | 11 lines | 9 code | 2 blank | 0 comment | 0 complexity | 5f7ba842cf11fa971368cdcbb009bb32 MD5 | raw file
 1import os
 2
 3fp = open(os.path.join(os.path.dirname(__file__), 'static', 'not_found.html'), 'rb')
 4not_found = fp.read()
 5fp.close()
 6
 7def application(environ, start_response):
 8    start_response('404 Not Found', 
 9                   [('Content-type', 'text/html; charset=UTF-8'),
10                    ('Content-Length', str(len(not_found)))])
11    return [not_found]