Commit 49fb25ca authored by Sebastien Robin's avatar Sebastien Robin

get dynamically all methods to patch

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16356 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ef3f4c10
...@@ -1290,13 +1290,9 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn, ...@@ -1290,13 +1290,9 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
Folder.setTitle = Base.setTitle Folder.setTitle = Base.setTitle
candidate_method_id_list = [] candidate_method_id_list = []
candidate_method_id_list = ["initBTrees", "manage_fixCount", "manage_cleanup", for folder_class in (HBTreeFolder2Base, HBTreeFolder2, CMFHBTreeFolder):
"getBatchObjectListing", "manage_object_workspace", candidate_method_id_list.extend([x for x in folder_class.__dict__
"tpValues", "objectCount", "has_key", "objectIds", if callable(getattr(folder_class, x)) and not
"objectItems", "objectMap", "objectIds_d", "objectMap_d", x in ('__getattr__','__init__', 'get')])
"keys", "values", "items", "hasObject", "generateId",
"__len__", "allowedContentTypes", "_delOb",
"_getOb", "_setObject", "_initBTrees", "_populateFromFolder",
"_fixCount", "_cleanup", "_setOb", "_checkId", "_delObject",]
for method_id in candidate_method_id_list: for method_id in candidate_method_id_list:
setattr(Folder, method_id, FolderMethodWrapper(method_id)) setattr(Folder, method_id, FolderMethodWrapper(method_id))
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