Update postgres_impl.py
This commit is contained in:
parent
9ec46b8c5c
commit
521dbf2be1
1 changed files with 2 additions and 9 deletions
|
|
@ -38,15 +38,8 @@ import pipmaster as pm
|
||||||
if not pm.is_installed("asyncpg"):
|
if not pm.is_installed("asyncpg"):
|
||||||
pm.install("asyncpg")
|
pm.install("asyncpg")
|
||||||
|
|
||||||
try:
|
import asyncpg
|
||||||
import asyncpg
|
from asyncpg import Pool
|
||||||
from asyncpg import Pool
|
|
||||||
|
|
||||||
except ImportError as e:
|
|
||||||
raise ImportError(
|
|
||||||
"`asyncpg` library is not installed. Please install it via pip: `pip install asyncpg`."
|
|
||||||
) from e
|
|
||||||
|
|
||||||
|
|
||||||
class PostgreSQLDB:
|
class PostgreSQLDB:
|
||||||
def __init__(self, config: dict[str, Any], **kwargs: Any):
|
def __init__(self, config: dict[str, Any], **kwargs: Any):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue