diff --git a/product/ERP5/ExplanationCache.py b/product/ERP5/ExplanationCache.py index 0efab331b1232d4cb39e62e36894ff2502f9db5c..efb9766dd29409d86cc87d68606014f7c3c2fd0b 100644 --- a/product/ERP5/ExplanationCache.py +++ b/product/ERP5/ExplanationCache.py @@ -27,7 +27,6 @@ # ############################################################################## -import types from zLOG import LOG from Products.CMFCore.utils import getToolByName from Products.ERP5Type.Cache import transactional_cached @@ -117,7 +116,7 @@ class ExplanationCache: insert_movement = True for path_id in container_path: local_path_dict = local_path_dict.setdefault(path_id, {}) - if type(local_path_dict) is not types.DictType: + if not isinstance(local_path_dict, dict): # A movement was already inserted insert_movement = False break @@ -135,7 +134,7 @@ class ExplanationCache: result = [] def browsePathDict(prefix, local_path_dict): for key, value in local_path_dict.items(): - if type(value) is not types.DictType: + if not isinstance(value, dict): # We have a real root result.append('%s/%s' % (prefix, key)) result.append('%s/%s/%%' % (prefix, key))