Skip to content

Commit 0b7b5c8

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

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
@@ -300,7 +300,7 @@ def get_new_connection(self, conn_params):
300300
if auth:
301301
cstr_parts['Authentication'] = auth
302302
if auth == 'ActiveDirectoryInteractive':
303-
cstr_parts.pop('PWD')
303+
cstr_parts.pop('PWD', '')
304304
cstr_parts['Trusted_Connection'] = 'no'
305305

306306
connstr = encode_connection_string(cstr_parts)

0 commit comments

Comments
 (0)