mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-30 13:32:30 +08:00
Make totpcgi log errors
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
@@ -190,4 +190,15 @@ def cgimain():
|
||||
sys.stdout.write(success_string)
|
||||
|
||||
if __name__ == '__main__':
|
||||
cgimain()
|
||||
try:
|
||||
cgimain()
|
||||
except Exception:
|
||||
logging.exception("Server error during processing")
|
||||
output = 'ERR\nInternal server error\n'
|
||||
sys.stdout.write('Status: 500 SERVER ERROR\n')
|
||||
sys.stdout.write('Content-type: text/plain\n')
|
||||
sys.stdout.write('Content-Length: %s\n' % len(output))
|
||||
sys.stdout.write('\n')
|
||||
|
||||
sys.stdout.write(output)
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user