From e955361610ad25cf2d5dee14f09028d8a61a0a4f Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Wed, 11 Sep 2019 12:15:04 +0530 Subject: [PATCH] fix: if not db host then localhost --- frappe/database/postgres/setup_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/database/postgres/setup_db.py b/frappe/database/postgres/setup_db.py index 79c7c3a304..01a97178f9 100644 --- a/frappe/database/postgres/setup_db.py +++ b/frappe/database/postgres/setup_db.py @@ -17,7 +17,7 @@ def setup_database(force, source_sql, verbose): subprocess_env['PGPASSWORD'] = str(frappe.conf.db_password) # bootstrap db subprocess.check_output([ - 'psql', frappe.conf.db_name, '-h', frappe.conf.db_host, '-U', + 'psql', frappe.conf.db_name, '-h', frappe.conf.db_host or 'localhost', '-U', frappe.conf.db_name, '-f', os.path.join(os.path.dirname(__file__), 'framework_postgres.sql') ], env=subprocess_env)