Commit b39bf4bb authored by Guido Trotter's avatar Guido Trotter
Browse files

SerializableConfigParser: Make Loads class indep

Currently SerializableConfigParser.Loads is a static method that returns
a SerializableConfigParser. With this patch we change it to a class
method that returns a member of the class. This way a subclass calling
Loads on itself will get its own member, rather than a bare
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarBalazs Lecz <>
parent 71834b2a
......@@ -1034,10 +1034,10 @@ class SerializableConfigParser(ConfigParser.SafeConfigParser):
return buf.getvalue()
def Loads(data):
def Loads(cls, data):
"""Load data from a string."""
buf = StringIO(data)
cfp = SerializableConfigParser()
cfp = cls()
return cfp
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