Updated string quoting
Converts passed integers and bool to string, used to prevent string.encode() from erroring.master
parent
cef87f4241
commit
1481fb215f
|
@ -113,6 +113,9 @@ class AGI:
|
||||||
sys.stderr.write('\n')
|
sys.stderr.write('\n')
|
||||||
|
|
||||||
def _quote(self, string):
|
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'), '"'])
|
return ''.join(['"', string.encode('ascii', 'ignore'), '"'])
|
||||||
|
|
||||||
def _handle_sighup(self, signum, frame):
|
def _handle_sighup(self, signum, frame):
|
||||||
|
|
Loading…
Reference in New Issue