Convert Float to string

Corrected where float values passed to _quote need to be converted to string to support .encode()
master
TuxPowered 2015-11-14 13:13:57 -08:00
parent 1481fb215f
commit 6b2c4dac7b
1 changed files with 2 additions and 0 deletions

View File

@ -116,6 +116,8 @@ class AGI:
""" provides double quotes to string, converts int/bool to string """ """ provides double quotes to string, converts int/bool to string """
if isinstance(string, int): if isinstance(string, int):
string = str(string) string = str(string)
if isinstance(string, float):
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):