示例#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
    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)