Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aexus
bypy
提交
e7bd1a0b
B
bypy
项目概览
aexus
/
bypy
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
bypy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e7bd1a0b
编写于
3月 22, 2018
作者:
H
Hou Tianze
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Properly handle error_code 31061 (treat as no error)
上级
950d891b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
4 deletion
+18
-4
HISTORY.md
HISTORY.md
+1
-0
HISTORY.rst
HISTORY.rst
+2
-0
bypy/bypy.py
bypy/bypy.py
+12
-1
bypy/const.py
bypy/const.py
+1
-1
update/update.json
update/update.json
+2
-2
未找到文件。
HISTORY.md
浏览文件 @
e7bd1a0b
### Version History:
-
1.6.2: Properly handle (treat it as no error) error_code 31061 (file already exists) from PCS
-
1.6.1: Ensure cache loading/saving failures won't affect normal operations; Fix the bug that clean up code not called on exit
-
1.6.0: Fix 1000 items limit for remote directory listing
-
1.5.13: Fix multiprocess upload/syncup missing some files
...
...
HISTORY.rst
浏览文件 @
e7bd1a0b
Version History:
~~~~~~~~~~~~~~~~
- 1.6.2: Properly handle (treat it as no error) error\_code 31061 (file
already exists) from PCS
- 1.6.1: Ensure cache loading/saving failures won't affect normal
operations; Fix the bug that clean up code not called on exit
- 1.6.0: Fix 1000 items limit for remote directory listing
...
...
bypy/bypy.py
浏览文件 @
e7bd1a0b
...
...
@@ -717,9 +717,20 @@ class ByPy(object):
or
ec
==
const
.
IEBlockMissInSuperFile2
:
self
.
pd
(
"Failed to combine files from MD5 slices"
)
result
=
ec
elif
ec
==
const
.
IEFileAlreadyExists
:
# ec == 31061, sc == 400, file already exists
# explanations:
# this error occurs when we try to create a directory at Baidu PCS when it already exists,
# this almost only happens when we upload using multi-process (double/multiple-directory creation).
# this error is innocuous, we can safely ignore it
# (actually, we don't need to do anything further and should just continue as usual).
# so to avoid confusions to the user and potential logic errors (more importantly) in the future,
# we just "lie" and force it to "no error".
# though this is not 100% accurate technically, i feel it's accurate enough for the users
self
.
pd
(
"Faking error_code {} to {}, this is safe to ignore."
.
format
(
const
.
IEFileAlreadyExists
,
const
.
ENoError
))
result
=
const
.
ENoError
# errors that make retrying meaningless
elif
(
#ec == 31061 or # sc == 400 file already exists
ec
==
31062
or
# sc == 400 file name is invalid
ec
==
31063
or
# sc == 400 file parent path does not exist
ec
==
31064
or
# sc == 403 file is not authorized
...
...
bypy/const.py
浏览文件 @
e7bd1a0b
...
...
@@ -12,7 +12,7 @@ import os
# https://packaging.python.org/single_source_version/
__title__
=
'bypy'
__version__
=
'1.6.
1
'
__version__
=
'1.6.
2
'
__author__
=
'Hou Tianze'
__license__
=
'MIT'
__desc__
=
'Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘 Python 客户端'
...
...
update/update.json
浏览文件 @
e7bd1a0b
{
"comment"
:
"Update info"
,
"recommendedVersion"
:
"1.6.
1
"
,
"minimumRequiredVersion"
:
"1.6.
1
"
"recommendedVersion"
:
"1.6.
2
"
,
"minimumRequiredVersion"
:
"1.6.
0
"
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录