From 28adbe8e409d449dd80aa1a59cc6996d569a95af Mon Sep 17 00:00:00 2001
From: Nicolas KAROLAK <nicolas@karolak.fr>
Date: Fri, 19 Jan 2018 17:34:37 +0100
Subject: [PATCH] fix db_port

---
 2.Common_services/3.PostgreSQL/0_setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/2.Common_services/3.PostgreSQL/0_setup.py b/2.Common_services/3.PostgreSQL/0_setup.py
index 0411cb08..4d22bf3e 100644
--- a/2.Common_services/3.PostgreSQL/0_setup.py
+++ b/2.Common_services/3.PostgreSQL/0_setup.py
@@ -5,7 +5,7 @@ import utils
 
 def setup(interactive=True):
     db_host = utils.get_conf('DB_HOST')
-    db_port = utils.get_conf('DB_PORT')
+    db_port = utils.get_conf('DB_PORT') or 5432
     if (db_host and not db_host.startswith('127') and db_host != 'localhost') or db_port != 5432:
         utils.log('Skipping postgresql setup because the database host is set to "%s:%i".' % (db_host, db_port))
         return
-- 
GitLab