Skip to content

Commit 1923813

Browse files
Polaris scan fix (#985)
Signed-off-by: Balram Choudhary <[email protected]>
1 parent c0765e1 commit 1923813

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"database" : "sample",
33
"user" : "db2inst1",
4-
"password" : "password",
4+
"password" : "",
55
"hostname" : "localhost",
66
"port" : 50000
77
}

ibm_db.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,8 +1860,8 @@ static PyObject *_python_ibm_db_connect_helper( PyObject *self, PyObject *args,
18601860
/* Set Options */
18611861
if ( !NIL_P(options) ) {
18621862
if(!PyDict_Check(options)) {
1863-
LogMsg(EXCEPTION, "options Parameter must be of type dictionay", fileName);
1864-
PyErr_SetString(PyExc_Exception, "options Parameter must be of type dictionay");
1863+
LogMsg(EXCEPTION, "options Parameter must be of type dictionary", fileName);
1864+
PyErr_SetString(PyExc_Exception, "options Parameter must be of type dictionary");
18651865
return NULL;
18661866
}
18671867
rc = _python_ibm_db_parse_options( options, SQL_HANDLE_DBC, conn_res );

ibm_db_dbi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ def executemany(self, operation, seq_parameters):
17511751
self.messages.append(Error(str(ibm_db.conn_errormsg())))
17521752
raise self.messages[len(self.messages) - 1]
17531753
if ibm_db.stmt_errormsg() is not None:
1754-
error_msg = f"Statement error: {str(ibm_db.conn_errormsg())}"
1754+
error_msg = f"Statement error: {str(ibm_db.stmt_errormsg())}"
17551755
LogMsg(ERROR, error_msg)
17561756
self.messages.append(Error(str(ibm_db.stmt_errormsg())))
17571757
raise self.messages[len(self.messages) - 1]

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,7 @@ def _downloadClidriver(url):
258258
shutil.copy('ibm_db.dll', 'clidriver')
259259

260260
def print_exception( e, url):
261-
if(os_ == "win"):
262-
err = "Error while downloading clidriver from the following URL : " + url + "\n" + str(e)
263-
else:
264-
err = "Error while downloading clidriver from the following URL : " + url + "\n" + str(e)
261+
err = "Error while downloading clidriver from the following URL : " + url + "\n" + str(e)
265262

266263
if "github" in url:
267264
if(os_ == "win"):

0 commit comments

Comments
 (0)