Commit 9c4d696c authored by Jérome Perrin's avatar Jérome Perrin

use isinstance to check type


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44532 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f5581749
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment