Fixing set_protocol_options(...) to verify key
authorRagner Magalhaes <ragner.magalhaes@openbossa.org>
Tue, 2 Dec 2008 21:17:08 +0000 (21:17 +0000)
committerAnderson Briglia <anderson.briglia@openbossa.org>
Sat, 28 Feb 2009 21:11:19 +0000 (17:11 -0400)
Fixing set_protocol_options(...) to verify keys

Signed-off-by: Ragner Magalhaes <ragner.magalhaes@indt.org.br>
Acked-by: Ricardo Guimaraes <ricardo.guimaraes@indt.org.br>
Acked-by: Dinorah Monteiro <dinorah.monteiro@indt.org.br>

git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1436 596f6dd7-e928-0410-a184-9e12fd12cf7e

account.pyx

index dd324af..9af451e 100644 (file)
@@ -283,6 +283,10 @@ cdef class Account:
 
             sett = str(<char *> setting)
 
 
             sett = str(<char *> setting)
 
+            if not po.has_key(sett):
+                iter = iter.next
+                continue
+
             if type == prefs.PURPLE_PREF_STRING:
 
                 str_value = <char *> po[sett]
             if type == prefs.PURPLE_PREF_STRING:
 
                 str_value = <char *> po[sett]