diff options
author | Simon Warta <[email protected]> | 2017-03-08 17:29:05 +0100 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-03-08 23:33:35 +0100 |
commit | 19312fb6f74b91c6435d82c7c823faa936ef7ede (patch) | |
tree | 82d907fe2a9c902677f1469abedeff245acae897 /configure.py | |
parent | 636d92f33206c63bd2cf361e60486c745d0f1d52 (diff) |
pylint: reduce lifespan of unchecked LexResult object in ModulePolicyInfo
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.py b/configure.py index 70c9965a6..ed021ad3e 100755 --- a/configure.py +++ b/configure.py @@ -818,11 +818,15 @@ class ModuleInfo(InfoObject): class ModulePolicyInfo(InfoObject): def __init__(self, infofile): super(ModulePolicyInfo, self).__init__(infofile) - self.lex = lex_me_harder( + lex = lex_me_harder( infofile, ['required', 'if_available', 'prohibited'], {}) + self.if_available = lex.if_available + self.required = lex.required + self.prohibited = lex.prohibited + def cross_check(self, modules): def check(tp, lst): for mod in lst: @@ -830,9 +834,9 @@ class ModulePolicyInfo(InfoObject): logging.error("Module policy %s includes non-existent module %s in <%s>" % ( self.infofile, mod, tp)) - check('required', self.lex.required) - check('if_available', self.lex.if_available) - check('prohibited', self.lex.prohibited) + check('required', self.required) + check('if_available', self.if_available) + check('prohibited', self.prohibited) class ArchInfo(InfoObject): |