From c3b701ca8eae1fbf7deeee6146faefa67540d80d Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 12 Sep 2005 06:27:20 +0000 Subject: [PATCH] custom_host can have a value even if we don't use it, and it should not be shown --- src/common/gajim.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/gajim.py b/src/common/gajim.py index e6b1a061f..5d2824fcd 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -201,8 +201,7 @@ def get_jid_from_account(account_name): def get_hostname_from_account(account_name): '''returns hostname (if custom hostname is used, that is returned)''' - hostname = config.get_per('accounts', account_name, 'custom_host') - if hostname == '': - hostname = config.get_per('accounts', account_name, 'hostname') - return hostname + if config.get_per('accounts', account_name, 'use_custom_host'): + return config.get_per('accounts', account_name, 'custom_host') + return config.get_per('accounts', account_name, 'hostname')