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
This commit is contained in:
parent
be29c542bf
commit
7c342e75bf
@ -315,7 +315,7 @@ class Service(gobject.GObject):
|
|||||||
"""Set the service's properties from either an Avahi
|
"""Set the service's properties from either an Avahi
|
||||||
TXT record (a list of lists of integers), or a
|
TXT record (a list of lists of integers), or a
|
||||||
python dictionary."""
|
python dictionary."""
|
||||||
if type(properties) != type({}):
|
if not isinstance (properties, dict):
|
||||||
raise ValueError("Properties must be a dictionary.")
|
raise ValueError("Properties must be a dictionary.")
|
||||||
|
|
||||||
# Make sure the properties are actually different
|
# Make sure the properties are actually different
|
||||||
|
Loading…
Reference in New Issue
Block a user