/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
- import os
- fp = open(os.path.join(os.path.dirname(__file__), 'static', 'disabled.html'), 'rb')
- disabled = fp.read()
- fp.close()
- def application(environ, start_response):
- start_response('503 Service Unavailable',
- [('Content-type', 'text/html; charset=UTF-8'),
- ('Content-Length', str(len(disabled))),
- ('Cache-Control', 'no-store, no-cache, max-age=0'),
- ('Pragma', 'no-cache')])
- return [disabled]