diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-08 13:45:58 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-08 13:45:58 +0100 |
commit | 4fa0f53521546c5be48a3a94815203aff84c2639 (patch) | |
tree | 53aef0b7a7858a07fabf5a208ba0c4ee000f268b /scripts | |
parent | UPGRADES: s/v0.x.x/v0.9.0 (diff) | |
download | synapse-4fa0f53521546c5be48a3a94815203aff84c2639.tar.xz |
Support reading directly from a config
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/port_from_sqlite_to_postgres.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py index da25113093..e7ed4c309b 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) |