Skip to content
Snippets Groups Projects
Commit 1a728b96 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-816: use default dbcreds from disk if none given

parent 820e11aa
No related branches found
No related tags found
2 merge requests!59Merge LOFAR-Release-4_0 into master,!57Resolve SW-816
......@@ -35,9 +35,14 @@ class RADBError(Exception):
pass
class RADatabase(PostgresDatabaseConnection):
def __init__(self, dbcreds: dbcredentials.DBCredentials,
def __init__(self, dbcreds: dbcredentials.DBCredentials=None,
num_connect_retries: int=5,
connect_retry_interval: float=1.0):
if dbcreds is None:
dbcreds = dbcredentials.DBCredentials().get("RADB")
logger.info("Read default RADB dbcreds from disk: %s" % dbcreds.stringWithHiddenPassword())
super().__init__(dbcreds=dbcreds,
auto_commit_selects=False,
num_connect_retries=num_connect_retries,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment