Author: asterix Date: 2009-03-11 10:40:08 +0100 (Wed, 11 Mar 2009) New Revision: 11151
Modified: trunk/src/config.py Log: [brubru] don't fail when open pref window with no accoutn configured. Fixes #4895
Modified: trunk/src/config.py =================================================================== --- trunk/src/config.py 2009-03-11 09:17:23 UTC (rev 11150) +++ trunk/src/config.py 2009-03-11 09:40:08 UTC (rev 11151) @@ -522,8 +522,11 @@ self.window.hide()
def get_per_account_option(self, opt): - '''Return the value of the option opt if it's the same in all accoutns + '''Return the value of the option opt if it's the same in all accounts else returns "mixed"''' + if len(gajim.connections) = 0: + # a non existant key return default value + return gajim.config.get_per('accounts', '__default__', opt) val = None for account in gajim.connections: v = gajim.config.get_per('accounts', account, opt)