本文整理匯總了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