Updated string quoting

Converts passed integers and bool to string, used to prevent string.encode() from erroring.
This commit is contained in:
TuxPowered committed 2015-11-14 12:26:07 -08:00
1 parent cef87f4241
commit 1481fb215f
1 file changed
+3
+3
View File
@@ -113,6 +113,9 @@ class AGI:
sys.stderr.write('\n')
def _quote(self, string):
""" provides double quotes to string, converts int/bool to string """
if isinstance(string, int):
string = str(string)
return ''.join(['"', string.encode('ascii', 'ignore'), '"'])
def _handle_sighup(self, signum, frame):