mirror of
https://git.securmail.fr/gizmo/python-module-pgsql.git
synced 2024-12-22 09:04:43 +01:00
maj module
This commit is contained in:
parent
f395cf2012
commit
b98ac71235
|
@ -1,14 +1,14 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from manage_psql.manage_psql import HandlePsql
|
from manage_psql import HandlePsql
|
||||||
|
|
||||||
MY_PSQL_CONN = HandlePsql()
|
MY_PSQL_CONN = HandlePsql()
|
||||||
MY_PSQL_CONN.psql_conn()
|
MY_PSQL_CONN.psql_conn()
|
||||||
print("PgSQL conncetion")
|
print("PgSQL connect")
|
||||||
|
|
||||||
STATE_CONN = MY_PSQL_CONN.psql_checkcon()
|
STATE_CONN = MY_PSQL_CONN.psql_checkcon()
|
||||||
print("PgSQL connection status : {}".format(STATE_CONN))
|
print("PgSQL connection status : {}".format(STATE_CONN))
|
||||||
|
|
||||||
print("PgSQL deconnection")
|
print("PgSQL disconnect")
|
||||||
MY_PSQL_CONN.psql_unconn()
|
MY_PSQL_CONN.psql_unconn()
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
# */
|
# */
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
from configparser import SafeConfigParser
|
from configparser import ConfigParser
|
||||||
import psycopg2
|
import psycopg2
|
||||||
|
|
||||||
# Read conf.ini
|
# Read conf.ini
|
||||||
INI_CONF = "./config/conf.ini"
|
INI_CONF = "./config/psql_conf.ini"
|
||||||
CONFIG = SafeConfigParser()
|
CONFIG = ConfigParser()
|
||||||
CONFIG.read(INI_CONF)
|
CONFIG.read(INI_CONF)
|
||||||
|
|
||||||
# DB parameters
|
# DB parameters
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue