コード例 #1
0
    def wrapper(username, coprname, **kwargs):
        if username.startswith("@"):
            group_name = username[1:]
            copr = ComplexLogic.get_group_copr_safe(group_name, coprname)
        else:
            copr = ComplexLogic.get_copr_safe(username, coprname)

        return f(copr, **kwargs)
コード例 #2
0
ファイル: api_general.py プロジェクト: ignatenkobrain/copr
    def wrapper(username, coprname, **kwargs):
        if username.startswith("@"):
            group_name = username[1:]
            copr = ComplexLogic.get_group_copr_safe(group_name, coprname)
        else:
            copr = ComplexLogic.get_copr_safe(username, coprname)

        return f(copr, **kwargs)
コード例 #3
0
ファイル: misc.py プロジェクト: danvratil/copr
 def wrapper(**kwargs):
     coprname = kwargs.pop("coprname")
     if "group_name" in kwargs:
         group_name = kwargs.pop("group_name")
         copr = ComplexLogic.get_group_copr_safe(group_name, coprname, with_mock_chroots=True)
     else:
         username = kwargs.pop("username")
         copr = ComplexLogic.get_copr_safe(username, coprname, with_mock_chroots=True)
     return f(copr, **kwargs)
コード例 #4
0
 def wrapper(**kwargs):
     coprname = kwargs.pop("coprname")
     if "group_name" in kwargs:
         group_name = kwargs.pop("group_name")
         copr = ComplexLogic.get_group_copr_safe(group_name,
                                                 coprname,
                                                 with_mock_chroots=True)
     else:
         username = kwargs.pop("username")
         copr = ComplexLogic.get_copr_safe(username,
                                           coprname,
                                           with_mock_chroots=True)
     return f(copr, **kwargs)