allow some missing path sections in runroot config

Fixes: https://pagure.io/koji/issue/527

Before path sections were expected to have zero-based numbering. If some
item was missing, parsing ended there.

Now we are more benevolent and we pick all path\d+ sections and sort
them by ordering number.
This commit is contained in:
Tomas Kopecek 2017-07-28 10:53:04 +02:00 committed by Mike McLean
parent 675e854ac0
commit 032e2aaddd
2 changed files with 8 additions and 6 deletions

View file

@ -31,6 +31,9 @@ class FakeConfigParser(object):
def read(self, path):
return
def sections(self):
return self.CONFIG.keys()
def has_option(self, section, key):
return section in self.CONFIG and key in self.CONFIG[section]