Commit f0bcfdde by Toby Lawrence

Don't quote empty values when encoding to INI.

It's not a requirement and has the potentialy to appear like an actual
string, and not an empty string, which breaks things like Grafana.
parent a4b6878e
...@@ -370,12 +370,6 @@ def encode_ini( ...@@ -370,12 +370,6 @@ def encode_ini(
vals = [val] vals = [val]
for item in vals: for item in vals:
if (
len(quote) == 0 and
isinstance(item, basestring) and
len(item) == 0):
item = '""'
if item is not None: if item is not None:
rv += "%s%s%s%s%s\n" % ( rv += "%s%s%s%s%s\n" % (
prop, delimiter, quote, _escape(item, quote), quote) prop, delimiter, quote, _escape(item, quote), quote)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment