python3 agi _quote

master
inpos 2017-03-01 20:49:12 +03:00
parent 4f303e668e
commit d81fa0ea5f
1 changed files with 4 additions and 1 deletions

View File

@ -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"""