本文整理汇总了Python中coprs.logic.actions_logic.ActionsLogic.send_create_gpg_key方法的典型用法代码示例。如果您正苦于以下问题:Python ActionsLogic.send_create_gpg_key方法的具体用法?Python ActionsLogic.send_create_gpg_key怎么用?Python ActionsLogic.send_create_gpg_key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coprs.logic.actions_logic.ActionsLogic
的用法示例。
在下文中一共展示了ActionsLogic.send_create_gpg_key方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fork_copr
# 需要导入模块: from coprs.logic.actions_logic import ActionsLogic [as 别名]
# 或者: from coprs.logic.actions_logic.ActionsLogic import send_create_gpg_key [as 别名]
def fork_copr(cls, copr, user, dstname, dstgroup=None):
forking = ProjectForking(user, dstgroup)
fcopr = forking.fork_copr(copr, dstname)
created = fcopr in db.session.new
if fcopr.full_name == copr.full_name:
raise exceptions.DuplicateException("Source project should not be same as destination")
builds_map = {}
for package in copr.packages:
fpackage = forking.fork_package(package, fcopr)
build = package.last_build()
if not build:
continue
fbuild = forking.fork_build(build, fcopr, fpackage)
builds_map[fbuild.id] = build.result_dir_name
ActionsLogic.send_create_gpg_key(fcopr)
ActionsLogic.send_fork_copr(copr, fcopr, builds_map)
return fcopr, created
示例2: add
# 需要导入模块: from coprs.logic.actions_logic import ActionsLogic [as 别名]
# 或者: from coprs.logic.actions_logic.ActionsLogic import send_create_gpg_key [as 别名]
def add(cls, user, name, selected_chroots, repos=None, description=None,
instructions=None, check_for_duplicates=False, group=None, **kwargs):
copr = models.Copr(name=name,
repos=repos or u"",
user_id=user.id,
description=description or u"",
instructions=instructions or u"",
created_on=int(time.time()),
**kwargs)
if group is not None:
UsersLogic.raise_if_not_in_group(user, group)
copr.group = group
# form validation checks for duplicates
cls.new(user, copr, check_for_duplicates=check_for_duplicates)
CoprChrootsLogic.new_from_names(copr, selected_chroots)
db.session.flush()
ActionsLogic.send_create_gpg_key(copr)
return copr