Signed-off-by: Aaron Bauman <b...@gentoo.org> --- lib/portage/_sets/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py index 6c6df4cca..ea0a8b9b4 100644 --- a/lib/portage/_sets/__init__.py +++ b/lib/portage/_sets/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2007-2019 Gentoo Authors +# Copyright 2007-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function @@ -150,12 +150,12 @@ class SetConfig: if not setname in self.psets: options["name"] = setname options["world-candidate"] = "False" - + # for the unlikely case that there is already a section with the requested setname import random while setname in parser.sections(): setname = "%08d" % random.randint(0, 10**10) - + parser.add_section(setname) for k, v in options.items(): parser.set(setname, k, v) @@ -200,7 +200,7 @@ class SetConfig: optdict = {} for oname in parser.options(sname): optdict[oname] = parser.get(sname, oname) - + # create single or multiple instances of the given class depending on configuration if parser.has_option(sname, "multiset") and \ parser.getboolean(sname, "multiset"): @@ -245,7 +245,7 @@ class SetConfig: "must be configured as multiset") % {"class": classname, "section": sname}) continue self._parsed = True - + def getSets(self): self._parse() return self.psets.copy() -- 2.28.0