Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ISRIC
wsm.rest
Commits
38e6ed5b
Commit
38e6ed5b
authored
Dec 03, 2019
by
Haas, Ingrid
Browse files
Update util.py
parent
150044e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/util.py
View file @
38e6ed5b
...
...
@@ -7,7 +7,7 @@ import psycopg2,psycopg2.extras
def
get_db_connection
():
"""Getting a DB connection based on a loaded config that contains the ip and login. This file is not part of repositor
"""
conn
=
psycopg2
.
connect
(
host
=
DB
[
"host"
],
database
=
DB
[
"database"
],
user
=
DB
[
"user"
],
password
=
DB
[
"password"
])
conn
=
psycopg2
.
connect
(
host
=
DB
[
"host"
],
database
=
DB
[
"database"
],
user
=
DB
[
"user"
],
password
=
DB
[
"password"
]
,
port
=
DB
[
"port"
]
)
dictCur
=
conn
.
cursor
(
cursor_factory
=
psycopg2
.
extras
.
DictCursor
)
return
dictCur
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment