/silverlining/server-root/var/www/default-disabled/main.py
Python | 13 lines | 11 code | 2 blank | 0 comment | 0 complexity | e8ecd4e53b6cf754c467dc6c3709c5d2 MD5 | raw file
Possible License(s): GPL-2.0
- 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]