From d81fa0ea5f6017478d92fb3d47718fe09856b2b6 Mon Sep 17 00:00:00 2001 From: inpos Date: Wed, 1 Mar 2017 20:49:12 +0300 Subject: [PATCH] python3 agi _quote --- asterisk/agi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/asterisk/agi.py b/asterisk/agi.py index 67519bd..09bcde3 100755 --- a/asterisk/agi.py +++ b/asterisk/agi.py @@ -129,7 +129,10 @@ class AGI: string = str(string) if isinstance(string, float): string = str(string) - return ''.join(['"', string.encode('utf8', 'ignore'), '"']) + if PY3: + return ''.join(['"', string, '"']) + else: + return ''.join(['"', string.encode('utf8', 'ignore'), '"']) def _handle_sighup(self, signum, frame): """Handle the SIGHUP signal"""