python3 agi stderr
parent
d8795f8864
commit
4f303e668e
|
@ -27,6 +27,7 @@ import sys
|
||||||
import pprint
|
import pprint
|
||||||
import re
|
import re
|
||||||
import signal
|
import signal
|
||||||
|
from six import PY3
|
||||||
|
|
||||||
DEFAULT_TIMEOUT = 2000 # 2sec timeout used as default for functions that take timeouts
|
DEFAULT_TIMEOUT = 2000 # 2sec timeout used as default for functions that take timeouts
|
||||||
DEFAULT_RECORD = 20000 # 20sec record time
|
DEFAULT_RECORD = 20000 # 20sec record time
|
||||||
|
@ -103,6 +104,9 @@ class AGI:
|
||||||
|
|
||||||
def _get_agi_env(self):
|
def _get_agi_env(self):
|
||||||
while 1:
|
while 1:
|
||||||
|
if PY3:
|
||||||
|
line = self.stdin.readline().strip().decode('utf8')
|
||||||
|
else:
|
||||||
line = self.stdin.readline().strip()
|
line = self.stdin.readline().strip()
|
||||||
self.stderr.write('ENV LINE: ')
|
self.stderr.write('ENV LINE: ')
|
||||||
self.stderr.write(line)
|
self.stderr.write(line)
|
||||||
|
|
Loading…
Reference in New Issue