Restore an API that vanished at some point despite there still
being users.
This is commit
fa747d25a7c47a1ceef165c4e1667b9755c9da0d on
autotest/i2n. The original commit message in full:
In
commit
5f6735c41fc769ac9ba6ee62754ab2b7da3d68d2
Author: Christian Herdtweck <christian.herdtweck@intra2net.com>
Date: Wed Apr 5 18:14:02 2017 +0200
Extend SimpleCnf.add_single to SimpleCnf.add
this ApI was folded into .add() without providing an overload for
downstream consumers. Provide the symbol again as a thin wrapper
around .add() and hope for the behavior to remain unaffected.
new_var['children'] = children # only add if non-empty
self.__cnfvars.append(new_var)
+
+ def add_single(self, varname, data=u'', number=None):
+ """
+ Add a single cnf var to config on top level.
+
+ Compatibility API.
+ """
+ return self.add (varname, data=data, number=number)
+
+
def append_file_generic(self, reader, cnf, replacements=None):
"""
Append conf var data from file.