Skip to content

Commit 9cd6ff9

Browse files
committed
Minor adaptions
1 parent 1373738 commit 9cd6ff9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pypsdm/db/weather/proxy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ def create_engine_from_env(echo=False) -> Engine:
116116
port = os.getenv("WEATHER_DB_PORT")
117117
database = os.getenv("WEATHER_DB_NAME")
118118
DATABASE_URL = f"postgresql://{username}:{password}@{host}:{port}/{database}"
119-
return create_engine(DATABASE_URL, echo=echo)
119+
try:
120+
return create_engine(DATABASE_URL, echo=echo)
121+
except Exception as e:
122+
raise ValueError(
123+
f"Failed to create engine with database url: {DATABASE_URL}"
124+
) from e
120125

121126

122127
def create_engine_from_params(

pypsdm/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
from .input import *
44
from .primary_data import *
55
from .result import *
6+
from .ts import *

0 commit comments

Comments
 (0)