Skip to content

Commit f36a105

Browse files
authored
Fix error on integer port
Sometimes the port is configured as an `int`
1 parent 3f10fca commit f36a105

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
@@ -264,7 +264,7 @@ def get_new_connection(self, conn_params):
264264

265265
if ms_drivers.match(driver):
266266
if port:
267-
host = ','.join((host,port))
267+
host = ','.join((host, str(port)))
268268
cstr_parts['SERVER'] = host
269269
elif options.get('host_is_server', False):
270270
if port:

0 commit comments

Comments
 (0)