PageRenderTime 15ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): GPL-2.0
  1. import os
  2. fp = open(os.path.join(os.path.dirname(__file__), 'static', 'not_found.html'), 'rb')
  3. not_found = fp.read()
  4. fp.close()
  5. def application(environ, start_response):
  6. start_response('404 Not Found',
  7. [('Content-type', 'text/html; charset=UTF-8'),
  8. ('Content-Length', str(len(not_found)))])
  9. return [not_found]