コード例 #1
0
    def GetRequest(self):
        request = MetapackageRequest()
        for fieldname, fieldinfo in MetapackagesFilterInfo.fields.items():
            if fieldname in self.args:
                fieldinfo['action'](request, self.args[fieldname])

        return request
コード例 #2
0
ファイル: metapackages.py プロジェクト: stephengroat/repology
    def GetRequest(self):
        request = MetapackageRequest()
        if 'search' in self.args:
            request.NameSubstring(self.args['search'])
        if 'maintainer' in self.args:
            request.Maintainer(self.args['maintainer'])
        if 'category' in self.args:
            request.Category(self.args['category'])
        if 'inrepo' in self.args:
            request.InRepo(self.args['inrepo'])
        if 'notinrepo' in self.args:
            request.NotInRepo(self.args['notinrepo'])
        if 'minspread' in self.args:
            request.MinFamilies(self.args['minspread'])
        if 'maxspread' in self.args:
            request.MaxFamilies(self.args['maxspread'])
        if 'outdated' in self.args:
            request.Outdated()

        return request