Update postgres_impl.py
This commit is contained in:
@@ -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):
|
||||||
|
Reference in New Issue
Block a user