Skip to content

Commit abba1f5

Browse files
authored
Simplify database URI initialization in GHSABackend
1 parent bb4403b commit abba1f5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • src/seclab_taskflows/mcp_servers

src/seclab_taskflows/mcp_servers/ghsa.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ class GHSABackend:
5757
def __init__(self, db_dir: str):
5858
# Directory in which the GHSA SQLite database file will be stored.
5959
self.db_dir = db_dir
60-
if not Path(self.db_dir).exists():
61-
db_uri = "sqlite://"
62-
else:
63-
db_uri = f"sqlite:///{self.db_dir}/ghsa.db"
60+
db_uri = "sqlite://" if not Path(self.db_dir).exists() else f"sqlite:///{self.db_dir}/ghsa.db"
6461
self.engine = create_engine(db_uri, echo=False)
6562
Base.metadata.create_all(
6663
self.engine,

0 commit comments

Comments
 (0)