Check groups entry in gerrit/projects

Following Icbef648e9948e0fa636dd0d15039b6fc229541ca, check that groups
are a list if defined.

Change-Id: I3a647c6b2debc7bb0a3a06b3f3407c4ea7e3f3e5
This commit is contained in:
Andreas Jaeger 2019-05-03 09:22:02 +02:00
parent 106cb9f290
commit 945a586f65
1 changed files with 5 additions and 0 deletions

View File

@ -253,6 +253,11 @@ def main():
found_errors += 1
print("ERROR: Non-StoryBoard project %s has default groups entry, "
"remove it" % name)
# Check that groups is a list
groups = p.get('groups')
if (groups and not isinstance(groups, list)):
found_errors += 1
print("Error: groups entry for project %s is not a list." % name)
if found_errors:
print("Found %d error(s) in %s" % (found_errors, args.infile))