def get_projects(self, config, options, requireOne=False):
        count = 0
        if len(options.project) > 0:
            count = count + 1
        if len(options.group) > 0:
            count = count + 1
        if options.all_groups:
            count = count + 1

        if count > 1:
            raise Exception("--project, --group and --all-groups are mutually exclusive")
        if count == 0 and requireOne:
            raise Exception("One of --project, --group or --all-groups is required")

        if len(options.project) == 0:
            projects = []
            if options.all_groups:
                groups = config.get_organization_groups()
            else:
                groups = options.group

            for group in groups:
                projects.extend(config.get_group_projects(group))
            return projects
        else:
            return options.project
dataset/ETHPy150Open berrange/gerrymander/gerrymander/commands.py/CommandProject.get_projects/original