Final clean up

This commit is contained in:
Jonathan Wong 2016-01-16 01:51:50 -08:00
parent 6152a1e913
commit 7f1a08dd04
12 changed files with 63 additions and 150 deletions

View file

@ -364,13 +364,18 @@ def create_https_certificates(ssl_cert, ssl_key):
return True
def cast_to_int(s):
try:
return int(s)
except ValueError:
return -1
def cast_to_float(s):
try:
return float(s)
except ValueError:
return -1
def convert_xml_to_json(xml):
o = xmltodict.parse(xml)
return json.dumps(o)