From c75fc233feb511f3ce1d421eb378009b440d1dee Mon Sep 17 00:00:00 2001 From: Elliot Matson Date: Fri, 29 Jul 2022 23:56:28 -0500 Subject: [PATCH] 3rd time's the charm --- pgadmin-config-creator/app.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pgadmin-config-creator/app.py b/pgadmin-config-creator/app.py index 458d06b..606e7c3 100644 --- a/pgadmin-config-creator/app.py +++ b/pgadmin-config-creator/app.py @@ -2,12 +2,13 @@ import json import os import time -with open('/config/servers.json', 'w') as f: +with open("/config/servers.json", "w") as f: print("created " + f.name) - template_string = ('{"Servers": {"1": {"Name": "DavinciResolve", ' - '"Group": "Servers", "Port": 5432, "Username": ' - '"postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}' - ) + template_string = ( + '{"Servers": {"1": {"Name": "DavinciResolve", ' + '"Group": "Servers", "Port": 5432, "Username": ' + '"postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}' + ) data = json.loads(template_string) data["Servers"]["1"]["Username"] = os.getenv("POSTGRES_USER") print("printing json to file...")