From 7c342e75bf0cd3a1e1a208568cf14f7d013bf8c8 Mon Sep 17 00:00:00 2001 From: John (J5) Palmieri Date: Tue, 03 Oct 2006 18:32:29 +0000 Subject: 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 --- (limited to 'services') diff --git a/services/presence/Service.py b/services/presence/Service.py index 1057071..9a216c3 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 -- cgit v0.9.1