本文整理汇总了Python中seaserv.seafile_rpc.get_repo函数的典型用法代码示例。如果您正苦于以下问题:Python get_repo函数的具体用法?Python get_repo怎么用?Python get_repo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_repo函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: GET
def GET(self):
inputs = web.webapi.input(relay_id='', token='',
relay_addr='', relay_port = '',
repo_id='', repo_name='',
encrypted='', magic='', email='',
enc_ver='', key='')
relay_id = inputs.relay_id
token = inputs.token
relay_addr = inputs.relay_addr
relay_port = inputs.relay_port
repo_id = inputs.repo_id
repo_name = inputs.repo_name
email = inputs.email
if not inputs.enc_ver:
enc_version = 1
else:
enc_version = int(inputs.enc_ver)
random_key = inputs.key
if seafile_rpc.get_repo(inputs.repo_id):
return render.repo_sync(repo_already_exists=True, **default_options)
tasks = seafile_rpc.get_clone_tasks()
for task in tasks:
if task.props.repo_id == inputs.repo_id:
if task.props.state != 'done' and task.props.state != 'error' \
and task.props.state != 'canceled':
raise web.seeother('/repos/download-tasks/')
return render.repo_sync(error_msg=None,
repo_already_exists=False,
repo_id=inputs.repo_id,
relay_id=inputs.relay_id,
token=token,
relay_addr=relay_addr,
relay_port=relay_port,
repo_name=repo_name,
worktree='',
encrypted=inputs.encrypted,
magic=inputs.magic,
email=email,
enc_version=enc_version,
random_key=random_key,
**default_options)
开发者ID:Sebi55,项目名称:seafile-for-openSUSE,代码行数:45,代码来源:main.py
示例2: GET
def GET(self):
inputs = web.webapi.input(
relay_id="",
token="",
relay_addr="",
relay_port="",
repo_id="",
repo_name="",
encrypted="",
magic="",
email="",
)
relay_id = inputs.relay_id
token = inputs.token
relay_addr = inputs.relay_addr
relay_port = inputs.relay_port
repo_id = inputs.repo_id
repo_name = inputs.repo_name
email = inputs.email
if seafile_rpc.get_repo(inputs.repo_id):
return render.repo_sync(repo_already_exists=True, **default_options)
tasks = seafile_rpc.get_clone_tasks()
for task in tasks:
if task.props.repo_id == inputs.repo_id:
if task.props.state != "done" and task.props.state != "error" and task.props.state != "canceled":
raise web.seeother("/repos/download-tasks/")
return render.repo_sync(
error_msg=None,
repo_already_exists=False,
repo_id=inputs.repo_id,
relay_id=inputs.relay_id,
token=token,
relay_addr=relay_addr,
relay_port=relay_port,
repo_name=repo_name,
worktree="",
encrypted=inputs.encrypted,
magic=inputs.magic,
email=email,
**default_options
)
开发者ID:hcnhjxox,项目名称:seafile,代码行数:45,代码来源:main.py
示例3: GET
def GET(self):
inputs = web.webapi.input(relay_id='', token='',
relay_addr='', relay_port = '',
repo_id='', repo_name='',
encrypted='', email='')
relay_id = inputs.relay_id
token = inputs.token
relay_addr = inputs.relay_addr
relay_port = inputs.relay_port
repo_id = inputs.repo_id
repo_name = inputs.repo_name
email = inputs.email
if seafile_rpc.get_repo(inputs.repo_id):
return render.repo_download(repo_already_exists=True,
**default_options)
tasks = seafile_rpc.get_clone_tasks()
for task in tasks:
if task.props.repo_id == inputs.repo_id:
if task.props.state != 'done' and task.props.state != 'error' \
and task.props.state != 'canceled':
raise web.seeother('/repos/download-tasks/')
repo_name = urllib.unquote(inputs.repo_name)
default_seafile_worktree = get_default_seafile_worktree ()
worktree = seafile_rpc.gen_default_worktree(default_seafile_worktree, repo_name)
return render.repo_download(error_msg=None,
repo_already_exists=False,
repo_id=inputs.repo_id,
relay_id=inputs.relay_id,
token=token,
relay_addr=relay_addr,
relay_port=relay_port,
repo_name=repo_name,
worktree=worktree,
encrypted=inputs.encrypted,
email=email,
**default_options)
开发者ID:sheyong,项目名称:seafile,代码行数:42,代码来源:main.py
注:本文中的seaserv.seafile_rpc.get_repo函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论