Permalink
Browse files

Use a more elegant way to detect type

  • Loading branch information...
1 parent 1259494 commit 5899c91cc3a4a3813dcc7c8e71bc0fa17988bae5 Ludovic Bellière committed Apr 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 idlerpg/Inventory.py
View
@@ -166,7 +166,7 @@ def properties(self):
@properties.setter
def properties(self, value):
- if type(value) != type(dict()):
+ if not isinstance(value, dict()):
logger.critical('Properties type mismatch. Got %s expected '\
'dict for item %s', (type(value), self.name))
self._properties = None

0 comments on commit 5899c91

Please sign in to comment.