Support reading directly from a config

pull/141/head
Erik Johnston 2015-05-08 13:45:58 +01:00
parent 326121aec4
commit 4fa0f53521
1 changed files with 3 additions and 0 deletions

View File

@ -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)