From d739d8b0680a3445acbf939bd15d1ea41967bc11 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 9 Jun 2004 15:31:20 +0000 Subject: [PATCH] if priority for an account is not in the config file, set it to 0 --- core/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core.py b/core/core.py index 8363db948..c0908b9ed 100644 --- a/core/core.py +++ b/core/core.py @@ -308,7 +308,9 @@ class GajimCore: type = 'available' if ev[2][0] == 'invisible': type = 'invisible' - prio = str(self.cfgParser.tab[ev[1]]['priority']) + prio = 0 + if self.cfgParser.tab[ev[1]].has_key('priority'): + prio = str(self.cfgParser.tab[ev[1]]['priority']) con.sendPresence(type, prio, ev[2][0], ev[2][1]) self.hub.sendPlugin('STATUS', ev[1], ev[2][0]) #ask our VCard