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

---
 2.Common_services/3.PostgreSQL/0_setup.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/2.Common_services/3.PostgreSQL/0_setup.py b/2.Common_services/3.PostgreSQL/0_setup.py
index 4d22bf3e..1139263b 100644
--- a/2.Common_services/3.PostgreSQL/0_setup.py
+++ b/2.Common_services/3.PostgreSQL/0_setup.py
@@ -5,9 +5,9 @@ import utils
 
 def setup(interactive=True):
     db_host = utils.get_conf('DB_HOST')
-    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))
+    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:%s".' % (db_host, db_port))
         return
     cmds = [
         'DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql',
-- 
GitLab