mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Final clean up
This commit is contained in:
parent
6152a1e913
commit
7f1a08dd04
12 changed files with 63 additions and 150 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue