Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
筑梦之路
bypy
提交
52af6fd7
B
bypy
项目概览
筑梦之路
/
bypy
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
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 搜索 >>
提交
52af6fd7
编写于
5月 05, 2018
作者:
H
Hou Tianze
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #446 which is caused by wrong initilization sequences
上级
da6e1e0f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
14 deletion
+15
-14
HISTORY.md
HISTORY.md
+1
-0
HISTORY.rst
HISTORY.rst
+1
-0
bypy/bypy.py
bypy/bypy.py
+9
-10
bypy/const.py
bypy/const.py
+3
-3
update/update.json
update/update.json
+1
-1
未找到文件。
HISTORY.md
浏览文件 @
52af6fd7
### Version History:
-
1.6.4: Fix
`--move`
argument causing exception
-
1.6.3: Change default timeout to 5 minutes
-
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
...
...
HISTORY.rst
浏览文件 @
52af6fd7
Version History:
~~~~~~~~~~~~~~~~
- 1.6.4: Fix ``--move`` argument causing exception
- 1.6.3: Change default timeout to 5 minutes
- 1.6.2: Properly handle (treat it as no error) error_code 31061 (file
already exists) from PCS
...
...
bypy/bypy.py
浏览文件 @
52af6fd7
...
...
@@ -310,10 +310,16 @@ class ByPy(object):
downloader_args
=
""
,
processes
=
const
.
DefaultProcessCount
,
secretkey
=
const
.
SecretKey
):
super
(
ByPy
,
self
).
__init__
()
self
.
jsonq
=
deque
(
maxlen
=
64
)
# these two variables are without leading double underscore "__" as to export the as public,
# so if any code using this class can check the current verbose / debug level
cached
.
verbose
=
self
.
verbose
=
verbose
cached
.
debug
=
self
.
debug
=
debug
if
not
cached
.
usecache
:
pinfo
(
"Forced hash recalculation, hash cache won't be used"
)
# declaration of myself
global
gbypyinst
gbypyinst
=
self
...
...
@@ -377,13 +383,6 @@ class ByPy(object):
self
.
__verify
=
True
self
.
processes
=
processes
# these two variables are without leadning double underscaore "__" as to export the as public,
# so if any code using this class can check the current verbose / debug level
cached
.
verbose
=
self
.
verbose
=
verbose
cached
.
debug
=
self
.
debug
=
debug
if
not
cached
.
usecache
:
pinfo
(
"Forced hash recaculation, hash cache won't be used"
)
#TODO: SSL verification causes some much trouble for different Python version
# I give up and disable it for good, or for bad
checkssl
=
False
...
...
@@ -514,7 +513,7 @@ class ByPy(object):
pr
(
msg
)
def
pd
(
self
,
msg
,
level
=
1
,
**
kwargs
):
if
self
.
debug
>=
level
:
if
self
.
debug
and
self
.
debug
>=
level
:
pdbg
(
msg
,
kwargs
)
def
shalloverwrite
(
self
,
prompt
):
...
...
@@ -1146,7 +1145,7 @@ Possible fixes:
def
__remove_local_on_success
(
self
,
localpath
):
if
self
.
__deletesource
:
self
.
pd
(
"Removing local path '{}' after successful upload."
.
format
(
localpath
))
result
=
cached
m
.
remove_path_and_cache
(
localpath
)
result
=
cached
.
remove_path_and_cache
(
localpath
)
if
result
==
const
.
ENoError
:
self
.
pd
(
"Local path '{}' removed."
.
format
(
localpath
))
else
:
...
...
bypy/const.py
浏览文件 @
52af6fd7
...
...
@@ -12,7 +12,7 @@ import os
# https://packaging.python.org/single_source_version/
__title__
=
'bypy'
__version__
=
'1.6.
3
'
__version__
=
'1.6.
4
'
__author__
=
'Hou Tianze'
__license__
=
'MIT'
__desc__
=
'Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘 Python 客户端'
...
...
@@ -176,14 +176,14 @@ HerokuRefreshUrl = HerokuUrl + '/refresh'
Heroku1RedirectUrl
=
Heroku1Url
+
'/auth'
Heroku1RefreshUrl
=
Heroku1Url
+
'/refresh'
AuthServerList
=
[
# url, rety?, message
# url, ret
r
y?, message
(
OpenShiftRedirectUrl
,
False
,
"Authorizing/refreshing with the OpenShift server ..."
),
(
HerokuRedirectUrl
,
False
,
"OpenShift server failed, authorizing/refreshing with the Heroku server ..."
),
(
Heroku1RedirectUrl
,
False
,
"Heroku server failed, authorizing/refreshing with the Heroku1 server ..."
),
(
GaeRedirectUrl
,
False
,
"Heroku1 server failed. Last resort: authorizing/refreshing with the GAE server ..."
),
]
RefreshServerList
=
[
# url, rety?, message
# url, ret
r
y?, message
(
OpenShiftRefreshUrl
,
False
,
"Authorizing/refreshing with the OpenShift server ..."
),
(
HerokuRefreshUrl
,
False
,
"OpenShift server failed, authorizing/refreshing with the Heroku server ..."
),
(
Heroku1RefreshUrl
,
False
,
"Heroku server failed, authorizing/refreshing with the Heroku1 server ..."
),
...
...
update/update.json
浏览文件 @
52af6fd7
{
"comment"
:
"Update info"
,
"recommendedVersion"
:
"1.6.
3
"
,
"recommendedVersion"
:
"1.6.
4
"
,
"minimumRequiredVersion"
:
"1.6.0"
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录