maj module

This commit is contained in:
Boris Tassou 2020-05-15 14:08:17 +02:00
parent f395cf2012
commit b98ac71235
7 changed files with 6 additions and 6 deletions

View File

@ -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()

View File

@ -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.