Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aexus
bypy
提交
5143b778
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 搜索 >>
提交
5143b778
编写于
3月 06, 2018
作者:
H
Hou Tianze
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Help now doesn't require you to auth; Fix auth/refresh_token seconds display
上级
3f63722a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
7 deletion
+14
-7
bypy/bypy.py
bypy/bypy.py
+10
-3
bypy/test/configdir/bypy.json
bypy/test/configdir/bypy.json
+4
-4
未找到文件。
bypy/bypy.py
浏览文件 @
5143b778
...
...
@@ -960,6 +960,9 @@ Possible fixes:
def
__server_auth_act
(
self
,
r
,
args
):
return
self
.
__store_json
(
r
)
def
__repr_timeout
(
self
):
return
self
.
__timeout
if
self
.
__timeout
else
'infinite'
def
__server_auth
(
self
):
params
=
{
'client_id'
:
self
.
__apikey
,
...
...
@@ -971,7 +974,7 @@ Possible fixes:
'
\n
Paste the Authorization Code here within 10 minutes.'
auth_code
=
ask
(
msg
).
strip
()
self
.
pd
(
"auth_code: {}"
.
format
(
auth_code
))
pr
(
'Authorizing, please be patient, it may take upto {} seconds...'
.
format
(
self
.
__
timeout
))
pr
(
'Authorizing, please be patient, it may take upto {} seconds...'
.
format
(
self
.
__
repr_timeout
()
))
pars
=
{
'code'
:
auth_code
,
...
...
@@ -1050,7 +1053,7 @@ Possible fixes:
def
__refresh_token
(
self
):
if
self
.
__use_server_auth
:
pr
(
'Refreshing, please be patient, it may take upto {} seconds...'
.
format
(
self
.
__
timeout
))
pr
(
'Refreshing, please be patient, it may take upto {} seconds...'
.
format
(
self
.
__
repr_timeout
()
))
pars
=
{
'bypy_version'
:
const
.
__version__
,
...
...
@@ -1103,7 +1106,8 @@ Possible fixes:
pr
(
'Used: '
+
human_size
(
j
[
'used'
]))
return
const
.
ENoError
def
help
(
self
,
command
):
# this comes first to make it easy to spot
@
staticmethod
def
help
(
command
):
# this comes first to make it easy to spot
''' Usage: help <command> - provide some information for the command '''
for
i
,
v
in
ByPy
.
__dict__
.
items
():
if
callable
(
v
)
and
v
.
__doc__
and
v
.
__name__
==
command
:
...
...
@@ -3614,6 +3618,9 @@ def main(argv=None): # IGNORE:C0111
(
len
(
args
.
command
)
==
1
and
args
.
command
[
0
].
lower
()
==
'help'
):
parser
.
print_help
()
return
const
.
EArgument
elif
len
(
args
.
command
)
==
2
and
args
.
command
[
0
].
lower
()
==
'help'
:
ByPy
.
help
(
args
.
command
[
1
])
return
const
.
EArgument
elif
args
.
command
[
0
]
in
ByPy
.
__dict__
:
# dir(ByPy), dir(by)
#timeout = args.timeout or None
...
...
bypy/test/configdir/bypy.json
浏览文件 @
5143b778
{
"access_token"
:
"21.
b6bfc014e7094b25486ca333da9dda72.2592000.1518896562
.2844184044-1572671"
,
"access_token"
:
"21.
d9048d34e50919be264f38b02f5cd4ba.2592000.1522859613
.2844184044-1572671"
,
"expires_in"
:
2592000
,
"refresh_token"
:
"22.
7ffec5b2e7b245f60498f40fd70b9b90.315360000.1831664562
.2844184044-1572671"
,
"refresh_token"
:
"22.
f7ae7645a659c3b90f71fee3f68c06a4.315360000.1835627613
.2844184044-1572671"
,
"scope"
:
"basic netdisk"
,
"session_key"
:
"9mnR
Jqcd9Jwmx+PQS0eda5eXNqKRuViH7c4xV37XaXbcPUDD5xkpL3E2luXB5tmZAUW3W3hI3NM09Fnl7hmyjJugfQGqNlbJ1
g=="
,
"session_secret"
:
"6
74217383ef19a2d8b1ce706c0e152c0
"
"session_key"
:
"9mnR
IBJFGBQTAKDFLj5G7V/jzVgoxWp0v5aXSBsAP8OS11xook9Y6FTVBif8ymyv9GJeJC6wEkNWemuAOadxJoJHp/iDQQg13
g=="
,
"session_secret"
:
"6
0df8b9c6de01c6e7d98154f64a3cb8a
"
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录