コード例 #1
0
ファイル: misc.py プロジェクト: praiskup/copr
 def wrapper(**kwargs):
     if "group_name" in kwargs:
         ownername = '@' + kwargs.pop("group_name")
     else:
         ownername = kwargs.pop("username")
     copr_dirname = kwargs.pop("copr_dirname")
     copr_dir = ComplexLogic.get_copr_dir_safe(ownername, copr_dirname)
     return f(copr_dir, **kwargs)
コード例 #2
0
def generate_repo_file(copr_dirname,
                       name_release,
                       repofile,
                       username=None,
                       group_name=None):
    """ Generate repo file for a given repo name.
        Reponame = username-coprname """

    ownername = username if username else ('@' + group_name)
    copr_dir = ComplexLogic.get_copr_dir_safe(ownername, copr_dirname)
    return render_generate_repo_file(copr_dir, name_release)