[Erp5-report] r45311 luke - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 12 09:48:19 CEST 2011
Author: luke
Date: Tue Apr 12 09:48:19 2011
New Revision: 45311
URL: http://svn.erp5.org?rev=45311&view=rev
Log:
- remove not needed assignments
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=45311&r1=45310&r2=45311&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Tue Apr 12 09:48:19 2011
@@ -775,7 +775,7 @@ class ObjectTemplateItem(BaseTemplateIte
p.CharacterDataHandler=F.handle_data
p.StartElementHandler=F.unknown_starttag
p.EndElementHandler=F.unknown_endtag
- r=p.Parse(data)
+ p.Parse(data)
try:
cache_database.db[key] = outfile.getvalue()
@@ -1262,7 +1262,7 @@ class ObjectTemplateItem(BaseTemplateIte
object_id = relative_url.split('/')[-1]
try:
container = self.unrestrictedResolveValue(portal, container_path)
- object = container._getOb(object_id) # We force access to the object to be sure
+ container._getOb(object_id) # We force access to the object to be sure
# that appropriate exception is thrown
# in case object is already backup and/or removed
if trash and trashbin is not None:
@@ -1691,7 +1691,7 @@ class RegisteredSkinSelectionTemplateIte
'business_template_registered_skin_selections', [])
current_selection_set = set(current_selection_list)
- skin_selection_list = workflow_id = self._objects[skin_folder_id]
+ skin_selection_list = self._objects[skin_folder_id]
if isinstance(skin_selection_list, str):
skin_selection_list = skin_selection_list.replace(',', ' ').split(' ')
for skin_selection in skin_selection_list:
@@ -1718,7 +1718,6 @@ class RegisteredSkinSelectionTemplateIte
modified_object_list = {}
if context.getTemplateFormatVersion() == 1:
new_keys = self._objects.keys()
- new_dict = PersistentMapping()
for path in new_keys:
if installed_item._objects.has_key(path):
# compare object to see it there is changes
@@ -1967,7 +1966,6 @@ class PortalTypeWorkflowChainTemplateIte
# if nothing or +, chain is added to the existing one
# if - chain is removed from the exisiting one
# if = chain replaced the existing one
- p = context.getPortalObject()
(default_chain, chain_dict) = getChainByType(context)
for key in self._archive.keys():
wflist = key.split(' | ')
@@ -2251,7 +2249,6 @@ class PortalTypeAllowedContentTypeTempla
def preinstall(self, context, installed_item, **kw):
modified_object_list = {}
if context.getTemplateFormatVersion() == 1:
- portal = context.getPortalObject()
new_key_list = self._objects.keys()
new_dict = PersistentMapping()
# fix key if necessary in installed bt for diff
@@ -2845,7 +2842,7 @@ class ActionTemplateItem(ObjectTemplateI
for obj in container.getActionInformationList()
if obj.getReference() in action_dict])
for name, obj in action_dict.iteritems():
- imported_action = container._importOldAction(obj).aq_base
+ container._importOldAction(obj).aq_base
else:
BaseTemplateItem.install(self, context, trashbin, **kw)
@@ -3178,7 +3175,6 @@ class ModuleTemplateItem(BaseTemplateIte
mapping['id'] = module.getId()
mapping['title'] = module.getTitle()
mapping['portal_type'] = module.getPortalType()
- permission_list = []
mapping['permission_list'] = module.showPermissions()
mapping['category_list'] = module.getCategoryList()
self._objects[module_id] = mapping
@@ -4897,7 +4893,7 @@ Business Template is a set of definition
delattr(self, attr)
# Secondly, make attributes empty.
for item_name in self._item_name_list:
- item = setattr(self, item_name, None)
+ setattr(self, item_name, None)
clean = WorkflowMethod(_clean)
@@ -5465,7 +5461,6 @@ Business Template is a set of definition
bt_portal_type_roles_list = list(getattr(self, 'template_portal_type_roles', []) or [])
bt_wf_chain_list = list(getattr(self, 'template_portal_type_workflow_chain', []) or [])
- p = self.getPortalObject()
for id in bt_portal_types_id_list:
portal_type = ttool.getTypeInfo(id)
if portal_type is None:
More information about the Erp5-report
mailing list