From 7c342e75bf0cd3a1e1a208568cf14f7d013bf8c8 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 3 Oct 2006 14:32:29 -0400 Subject: [PATCH] s/type(val) == type({})/isinstance(val, dict) This needs to be changed everwhere in the code because isinstance will match derived types where == will not --- services/presence/Service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/presence/Service.py b/services/presence/Service.py index 1057071a..9a216c34 100644 --- a/services/presence/Service.py +++ b/services/presence/Service.py @@ -315,7 +315,7 @@ class Service(gobject.GObject): """Set the service's properties from either an Avahi TXT record (a list of lists of integers), or a python dictionary.""" - if type(properties) != type({}): + if not isinstance (properties, dict): raise ValueError("Properties must be a dictionary.") # Make sure the properties are actually different