From ddda7af1635693f21b9993eb551a1e9784dd5cc7 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sat, 27 Jul 2013 09:10:14 +0200 Subject: [PATCH] Allowing empty hostname when using postgres. fixes #437 --- modoboa/core/commands/deploy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modoboa/core/commands/deploy.py b/modoboa/core/commands/deploy.py index 733f53365..617ab8ce4 100644 --- a/modoboa/core/commands/deploy.py +++ b/modoboa/core/commands/deploy.py @@ -71,9 +71,10 @@ class DeployCommand(Command): info['dbtype'] = 'mysql' if info['dbtype'] == 'postgres': info['dbtype'] = 'postgresql_psycopg2' - info['dbhost'] = raw_input('Database host (default: localhost): ') + default_host = 'localhost' if info['dbtype'] == 'mysql' else '' + info['dbhost'] = raw_input("Database host (default: '%s'): " % default_host) if info['dbhost'] == '': - info['dbhost'] = 'localhost' + info['dbhost'] = default_host info['dbname'] = raw_input('Database name: ') info['username'] = raw_input('Username: ') info['password'] = getpass.getpass('Password: ')