/silverlining/server-root/var/www/default-notfound/main.py
Python | 11 lines | 9 code | 2 blank | 0 comment | 0 complexity | 5f7ba842cf11fa971368cdcbb009bb32 MD5 | raw file
Possible License(s): GPL-2.0
- import os
- fp = open(os.path.join(os.path.dirname(__file__), 'static', 'not_found.html'), 'rb')
- not_found = fp.read()
- fp.close()
- def application(environ, start_response):
- start_response('404 Not Found',
- [('Content-type', 'text/html; charset=UTF-8'),
- ('Content-Length', str(len(not_found)))])
- return [not_found]