Skip to content

Commit

Permalink
删除无用代码;修复 ComponentOAuth 实例化错误 (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
yqkcn committed Mar 10, 2022
1 parent ba46f7e commit 74fcd41
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions wechatpy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ def get_client_by_appid(self, authorizer_appid):
if not access_token:
ret = self.refresh_authorizer_token(authorizer_appid, refresh_token)
access_token = ret["authorizer_access_token"]
refresh_token = ret["authorizer_refresh_token"]
access_token_key = f"{authorizer_appid}_access_token"
expires_in = 7200
if "expires_in" in ret:
Expand Down Expand Up @@ -392,7 +391,7 @@ def get_component_oauth(self, authorizer_appid):
:params authorizer_appid: 授权公众号appid
"""
return ComponentOAuth(authorizer_appid, component=self)
return ComponentOAuth(self, authorizer_appid)


class ComponentOAuth:
Expand Down

0 comments on commit 74fcd41

Please sign in to comment.