Merge pull request #17 from tuxpowered/master
Corrected _quote() to allow utf-8 strings to be passed.master
commit
bd6ac43f86
|
@ -113,7 +113,12 @@ class AGI:
|
||||||
sys.stderr.write('\n')
|
sys.stderr.write('\n')
|
||||||
|
|
||||||
def _quote(self, string):
|
def _quote(self, string):
|
||||||
return ''.join(['"', str(string), '"'])
|
""" provides double quotes to string, converts int/bool to string """
|
||||||
|
if isinstance(string, int):
|
||||||
|
string = str(string)
|
||||||
|
if isinstance(string, float):
|
||||||
|
string = str(string)
|
||||||
|
return ''.join(['"', string.encode('ascii', 'ignore'), '"'])
|
||||||
|
|
||||||
def _handle_sighup(self, signum, frame):
|
def _handle_sighup(self, signum, frame):
|
||||||
"""Handle the SIGHUP signal"""
|
"""Handle the SIGHUP signal"""
|
||||||
|
|
Loading…
Reference in New Issue