Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
tas_token_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1105c7cc
authored
Sep 15, 2023
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update 不再自动登录
parent
544c9458
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
lib/apidigikey.py
lib/apidigikey.py
View file @
1105c7cc
...
...
@@ -53,14 +53,18 @@ class DGTokenCrawler(token_lib.BaseTokenCrawler):
try
:
token_json
=
self
.
get_token_by_refresh_token
()
if
not
token_json
.
get
(
'access_token'
,
''
):
dd_send_msg
(
'digikey自动登录同步token'
)
resp_data
=
self
.
get_token_json
()
if
resp_data
==
False
:
mgs
=
"digikey 刷新token失败,请手动获取"
dd_send_msg
(
mgs
)
self
.
logger
.
error
(
mgs
)
raise
Exception
(
mgs
)
token_json
=
resp_data
[
'data'
]
# dd_send_msg('digikey自动登录同步token')
# resp_data = self.get_token_json()
# if resp_data == False:
# mgs = "digikey 刷新token失败,请手动获取"
# dd_send_msg(mgs)
# self.logger.error(mgs)
# raise Exception(mgs)
# token_json = resp_data['data']
mgs
=
"digikey 刷新token失败,请手动获取"
dd_send_msg
(
mgs
)
self
.
logger
.
error
(
mgs
)
raise
Exception
(
mgs
)
access_token
,
refresh_token
=
token_json
[
'access_token'
],
token_json
[
'refresh_token'
]
apidigikey_log
.
info
(
access_token
)
apidigikey_log
.
info
(
refresh_token
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment