mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 03:19:48 +00:00
Fix httpapi with python3
async is now particularly special, rename variable to fix it
This commit is contained in:
parent
2bd2946e9f
commit
331d10140a
@ -511,10 +511,10 @@ def resourcehandler_backend(env, start_response):
|
||||
width = querydict.get('width', 80)
|
||||
height = querydict.get('height', 24)
|
||||
datacallback = None
|
||||
async = None
|
||||
asynchdl = None
|
||||
if 'HTTP_CONFLUENTASYNCID' in env:
|
||||
async = confluent.asynchttp.get_async(env, querydict)
|
||||
termrel = async.set_term_relation(env)
|
||||
asynchdl = confluent.asynchttp.get_async(env, querydict)
|
||||
termrel = asynchdl.set_term_relation(env)
|
||||
datacallback = termrel.got_data
|
||||
try:
|
||||
if shellsession:
|
||||
@ -537,8 +537,8 @@ def resourcehandler_backend(env, start_response):
|
||||
start_response("500 Internal Server Error", headers)
|
||||
return
|
||||
sessid = _assign_consessionid(consession)
|
||||
if async:
|
||||
async.add_console_session(sessid)
|
||||
if asynchdl:
|
||||
asynchdl.add_console_session(sessid)
|
||||
start_response('200 OK', headers)
|
||||
yield '{"session":"%s","data":""}' % sessid
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user