Skip to content

Commit 69a6412

Browse files
committed
lint: Fix rpmlintrc option parsing
1 parent af3c4bc commit 69a6412

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

rpmlint/lint.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def _load_rpmlintrc(self):
200200
Load rpmlintrc from argument or load up from folder
201201
"""
202202
if not self.options['rpmlintrc']:
203+
self.options['rpmlintrc'] = []
203204
# Skip auto-loading when running under PYTEST
204205
if not os.environ.get('PYTEST_XDIST_TESTRUNUID'):
205206
# first load SUSE-specific locations
@@ -217,8 +218,10 @@ def _load_rpmlintrc(self):
217218
if len(self.options['rpmlintrc']) > 1:
218219
# multiple rpmlintrcs are highly undesirable
219220
print_warning('There are multiple items to be loaded: {}.'.format(' '.join(map(str, self.options['rpmlintrc']))))
220-
for rcfile in self.options['rpmlintrc']:
221-
self.config.load_rpmlintrc(rcfile)
221+
222+
if self.options['rpmlintrc']:
223+
for rcfile in self.options['rpmlintrc']:
224+
self.config.load_rpmlintrc(rcfile)
222225

223226
def _print_header(self):
224227
"""

0 commit comments

Comments
 (0)