def dict_to_ul(data, result=''):
try:
if not isinstance(data, dict):
return data
result += "
"
for key in data.keys():
result += "- "
value = data[key]
if isinstance(value, dict):
result += "%s: %s" % (key, dict_to_ul(value))
else:
result += "%s: %s" % (key, value)
result += "
"
result += "
"
return result
except Exception:
return ''