From 4fa0f53521546c5be48a3a94815203aff84c2639 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:45:58 +0100 Subject: [PATCH] Support reading directly from a config --- scripts/port_from_sqlite_to_postgres.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py index da2511309..e7ed4c309 100755 --- a/scripts/port_from_sqlite_to_postgres.py +++ b/scripts/port_from_sqlite_to_postgres.py @@ -723,6 +723,9 @@ if __name__ == "__main__": postgres_config = yaml.safe_load(args.postgres_config) + if "database" in postgres_config: + postgres_config = postgres_config["database"] + if "name" not in postgres_config: sys.stderr.write("Malformed database config: no 'name'") sys.exit(2)