]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix typo in"Connecting to databases with access tokens" (#6432)
authorKatsuyuki Sakai <sakai@onflow.jp>
Tue, 25 May 2021 19:51:53 +0000 (04:51 +0900)
committerGitHub <noreply@github.com>
Tue, 25 May 2021 19:51:53 +0000 (21:51 +0200)
lib/sqlalchemy/dialects/mssql/pyodbc.py

index 95b2bb48eb526f06e290fefb5dd6bc81c9d4b93b..8c99c1d0b4a9e1bb28313b9e19c5159d2883adcf 100644 (file)
@@ -124,7 +124,7 @@ database using Azure credentials::
 
         # create token credential
         raw_token = azure_credentials.get_token(TOKEN_URL).token.encode("utf-16-le")
-        token_struct = struct.pack(f"<I{len(raw_token)}s", len(raw_token), token)
+        token_struct = struct.pack(f"<I{len(raw_token)}s", len(raw_token), raw_token)
 
         # apply it to keyword arguments
         cparams["attrs_before"] = {SQL_COPT_SS_ACCESS_TOKEN: token_struct}