blob: f29e42183829e6d73dbe53750a394931bef4a9df [file] [edit]
#!/usr/bin/env python
import sys
import sqlalchemy
if len(sys.argv) != 2:
raise "Missing db path for lnt-wait-db"
db = sys.argv[1]
engine = sqlalchemy.create_engine(db)
started = False
while not started:
try:
engine.execute("SELECT 1")
started = True
except Exception as inst:
pass