[~] Refactor

This commit is contained in:
Siarhei Siniak 2022-06-18 20:15:51 +03:00
parent 12977088fa
commit b0ff8b86de

@ -12,6 +12,7 @@ sys.path.insert(0, os.path.dirname(__file__))
def application(environ, start_response):
try:
t4 = int(environ.get('CONTENT_LENGTH', '0'))
t3 = environ['wsgi.input'].read(t4)
def op1(rh):
@ -81,7 +82,6 @@ def application(environ, start_response):
t9 = t9.replace('Transfer-Encoding: chunked\r\n', '')
t9 += 'Content-Length: %d\r\n' % len(t10)
t11 = t9.encode('utf-8') + t10
response += pprint.pformat(dict(t9=t9, t10=t10, t11=t11))
t13 = t9.splitlines()[0]
t14 = t13.find(' ')
t15 = t13[t14 + 1:]
@ -95,4 +95,8 @@ def application(environ, start_response):
else:
t1 = start_response(t15, t16)
t1(t10)
except:
with io.open('log.txt', 'a') as f:
f.write(traceback.format_exc())
return []