Skip to content

Commit

Permalink
fix: compare with enum (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: cpcchengt <[email protected]>
  • Loading branch information
cpcchengt authored Aug 6, 2024
1 parent e88e1e2 commit 0270c41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opengemini_client/client_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def update_headers(self, method, url_path, headers=None) -> dict:
if method in UrlConst.no_auth_required[url_path]:
return headers

if self.config.auth_config.auth_type == self.config.auth_config.auth_type.PASSWORD:
if self.config.auth_config.auth_type == AuthType.PASSWORD:
encode_string = f"{self.config.auth_config.username}:{self.config.auth_config.password}"
authorization = "Basic " + base64.b64encode(encode_string.encode()).decode()
headers["Authorization"] = authorization
Expand Down

0 comments on commit 0270c41

Please sign in to comment.