Skip to content

Commit

Permalink
Merge pull request #163 from CZJCC/hotfix/client
Browse files Browse the repository at this point in the history
增加access token调用判断
  • Loading branch information
CZJCC authored Jul 4, 2024
2 parents af2a19f + 8466bc3 commit b903144
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nacos/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ def __init__(self, server_addresses=None, endpoint=None, namespace=None, ak=None
self.logDir = logDir

self.heartbeats: Dict[str, HeartbeatTask] = {}
self.get_access_token()
if self.username and self.password:
self.get_access_token()
logger.info("[client-init] endpoint:%s, tenant:%s" % (endpoint, namespace))

def set_options(self, **kwargs):
Expand Down

0 comments on commit b903144

Please sign in to comment.