From d7c8c6825704cdfee1b86bb25ba1f0638105c75b Mon Sep 17 00:00:00 2001 From: joda9 Date: Wed, 18 Sep 2024 11:06:59 +0200 Subject: [PATCH] removing local path from non local db call --- edisgo/io/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edisgo/io/db.py b/edisgo/io/db.py index fa3d77bc..0c417282 100644 --- a/edisgo/io/db.py +++ b/edisgo/io/db.py @@ -149,7 +149,7 @@ def ssh_tunnel(cred: dict) -> str: return str(server.local_bind_port) -def engine(path: Path | str, ssh: bool = False) -> Engine: +def engine(path: Path | str = None, ssh: bool = False) -> Engine: """ Engine for local or remote database. @@ -167,14 +167,14 @@ def engine(path: Path | str, ssh: bool = False) -> Engine: Database engine """ - cred = credentials(path=path) if not ssh: return create_engine( - "postgresql+oedialect://:@toep.iks.cs.ovgu.de", + "postgresql+oedialect://:" "@toep.iks.cs.ovgu.de", echo=False, ) + cred = credentials(path=path) local_port = ssh_tunnel(cred) return create_engine(