From 6a6ab1beb21a1d630c5838cc1475bb025f27543a Mon Sep 17 00:00:00 2001 From: inpos Date: Wed, 1 Mar 2017 21:54:38 +0300 Subject: [PATCH] python3 last change --- asterisk/agi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asterisk/agi.py b/asterisk/agi.py index 3dba46b..0a2c16e 100755 --- a/asterisk/agi.py +++ b/asterisk/agi.py @@ -200,6 +200,8 @@ class AGI: elif code == 520: usage = [line] line = self.stdin.readline().strip() + if PY3: + if type(line) is bytes: line = line.decode('utf8') while line[:3] != '520': usage.append(line) line = self.stdin.readline().strip()