Signed-off-by: Aaron Bauman <b...@gentoo.org> --- lib/portage/env/config.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/portage/env/config.py b/lib/portage/env/config.py index 865d8353a..522168640 100644 --- a/lib/portage/env/config.py +++ b/lib/portage/env/config.py @@ -1,5 +1,5 @@ # config.py -- Portage Config -# Copyright 2007-2009 Gentoo Foundation +# Copyright 2007-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 __all__ = ["ConfigLoaderKlass", "GenericFile", "PackageKeywordsFile", @@ -13,7 +13,7 @@ class ConfigLoaderKlass(UserDict): A base class stub for things to inherit from. Users may want a non-file backend. """ - + def __init__(self, loader): """ @param loader: A class that has a load() that returns two dicts @@ -38,13 +38,13 @@ class GenericFile(UserDict): helpful when you really have no idea what you are loading (hint hint the file should perhaps declare what type it is? ;) """ - + loaders = [KeyListFileLoader, KeyValuePairFileLoader, ItemFileLoader] - + def __init__(self, filename): UserDict.__init__(self) self.filename = filename - + def load(self): for loader in self.loaders: l = loader(self.filename, None) @@ -64,7 +64,7 @@ class PackageKeywordsFile(ConfigLoaderKlass): def __init__(self, filename): super(PackageKeywordsFile, self).__init__( self.default_loader(filename, validator=None)) - + class PackageUseFile(ConfigLoaderKlass): """ Inherits from PackageUse; implements a file-based backend. Doesn't handle recursion yet. @@ -74,11 +74,11 @@ class PackageUseFile(ConfigLoaderKlass): def __init__(self, filename): super(PackageUseFile, self).__init__( self.default_loader(filename, validator=None)) - + class PackageMaskFile(ConfigLoaderKlass): """ A class that implements a file-based package.mask - + Entires in package.mask are of the form: atom1 atom2 @@ -86,7 +86,7 @@ class PackageMaskFile(ConfigLoaderKlass): -atom3 to revert a previous mask; this only works when masking files are stacked """ - + default_loader = ItemFileLoader def __init__(self, filename): @@ -97,9 +97,9 @@ class PortageModulesFile(ConfigLoaderKlass): """ File Class for /etc/portage/modules """ - + default_loader = KeyValuePairFileLoader - + def __init__(self, filename): super(PortageModulesFile, self).__init__( self.default_loader(filename, validator=None)) -- 2.28.0