Update pg.py

This commit is contained in:
midoks 2022-11-22 11:33:15 +08:00
parent 84a8e755a8
commit 1d66f9c355
1 changed files with 2 additions and 2 deletions

View File

@ -40,14 +40,14 @@ class ORM:
self.__DB_CONN = psycopg2.connect(database='postgres',
user=self.__DB_USER,
password=self.__DB_PASS,
host=self.__DB_HOST,
host=self.__DB_SOCKET,
port=int(self.__DB_PORT))
except Exception as e:
self.__DB_HOST = '127.0.0.1'
self.__DB_CONN = psycopg2.connect(database='postgres',
user=self.__DB_USER,
password=self.__DB_PASS,
host=self.__DB_HOST,
host=self.__DB_SOCKET,
port=int(self.__DB_PORT))
else:
try: