Fix the single item string quoting function.

This commit is contained in:
Joshua Harlow 2012-10-11 19:14:14 -07:00
parent 757f94bdf3
commit 03be2c5354

View File

@ -61,7 +61,7 @@ class SysConf(configobj.ConfigObj):
quot_func = (lambda x: str(x))
if value[0] in ['"', "'"] and value[-1] in ['"', "'"]:
if len(value) == 1:
quot_func = self._get_single_quote
quot_func = (lambda x: self._get_single_quote(x) % x)
else:
# Quote whitespace if it isn't the start + end of a shell command
white_space_ok = False