Skip to content

Commit a31af19

Browse files
committed
Make sure there is no key error when removing the PWD entry from the cstr dict
1 parent a72c5c7 commit a31af19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql_server/pyodbc/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def get_new_connection(self, conn_params):
298298
if auth:
299299
cstr_parts['Authentication'] = auth
300300
if auth == 'ActiveDirectoryInteractive':
301-
cstr_parts.pop('PWD')
301+
cstr_parts.pop('PWD', '')
302302
cstr_parts['Trusted_Connection'] = 'no'
303303

304304
connstr = encode_connection_string(cstr_parts)

0 commit comments

Comments
 (0)