def check_request(self):
"""
check if the self.poller process has finished; if so, handle results
and stop the poller_check_task. If update_active has also already been
called, stop the reactor.
"""
logger.debug('check_request called')
if self.poller.poll() is None:
logger.debug('poller process still running')
return
# stop the looping task
self.poller_check_task.stop()
assert self.poller.returncode == 0
out, err = self.poller.communicate()
self.response = out.strip()
logger.debug('check_request done; response: %s', self.response)
# on python3, this will be binary
if not isinstance(self.response, str):
self.response = self.response.decode('utf-8')
if self.update_active_called:
self.stop_reactor()
test_redirector.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录