Invert logic of namespace vs pdc type

We are iterating through the gitolite config that is namespace
aware (ie: rpms, modules) and are checking if the repo is in the
list to update, list coming from pdc and thus style aware not
namespaces (ie: rpm, module).
So invert the logic.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2018-02-20 17:23:16 +01:00
parent d640cbbba0
commit 445e2eadfc

View file

@ -84,10 +84,10 @@ def main():
if row.strip().startswith('repo '):
name = row.strip().split()[-1]
if name.startswith('rpm/'):
name = 'rpms/%s' % name[4:]
elif name.startswith('module/'):
name = 'modules/%s' % name[7:]
if name.startswith('rpms/'):
name = 'rpm/%s' % name[5:]
elif name.startswith('modules/'):
name = 'module/%s' % name[8:]
if name in repos:
process = True