Commit c6f1e593 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Do not hide errors

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27110 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c1efbd0c
...@@ -50,7 +50,7 @@ class PortalTypeActionDocumentationHelper(DocumentationHelper): ...@@ -50,7 +50,7 @@ class PortalTypeActionDocumentationHelper(DocumentationHelper):
""" """
Returns the permissions of the documentation helper Returns the permissions of the documentation helper
""" """
permissions = getattr(self.getDocumentedObject(), "permissions", []) permissions = getattr(self.getDocumentedObject(), "permissions")
return ', '.join(x for x in permissions) return ', '.join(x for x in permissions)
security.declareProtected(Permissions.AccessContentsInformation, 'getVisible') security.declareProtected(Permissions.AccessContentsInformation, 'getVisible')
...@@ -66,6 +66,6 @@ class PortalTypeActionDocumentationHelper(DocumentationHelper): ...@@ -66,6 +66,6 @@ class PortalTypeActionDocumentationHelper(DocumentationHelper):
""" """
Returns the category of the documentation helper Returns the category of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "category", '') return getattr(self.getDocumentedObject(), "category")
InitializeClass(PortalTypeActionDocumentationHelper) InitializeClass(PortalTypeActionDocumentationHelper)
...@@ -130,7 +130,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper): ...@@ -130,7 +130,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
""" """
Returns the list of allowed content type of the documentation helper Returns the list of allowed content type of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "allowed_content_types", []) return getattr(self.getDocumentedObject(), "allowed_content_types")
security.declareProtected(Permissions.AccessContentsInformation, 'getAllowedContentTypeUriList') security.declareProtected(Permissions.AccessContentsInformation, 'getAllowedContentTypeUriList')
def getAllowedContentTypeUriList(self): def getAllowedContentTypeUriList(self):
...@@ -145,7 +145,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper): ...@@ -145,7 +145,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
""" """
Returns the list of hidden content type of the documentation helper Returns the list of hidden content type of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "hidden_content_type_list", []) return getattr(self.getDocumentedObject(), "hidden_content_type_list")
security.declareProtected(Permissions.AccessContentsInformation, 'getHiddenContentTypeUriList') security.declareProtected(Permissions.AccessContentsInformation, 'getHiddenContentTypeUriList')
def getHiddenContentTypeUriList(self): def getHiddenContentTypeUriList(self):
...@@ -160,14 +160,14 @@ class PortalTypeDocumentationHelper(DocumentationHelper): ...@@ -160,14 +160,14 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
""" """
Returns the list of base category of the documentation helper Returns the list of base category of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "base_category_list", []) return getattr(self.getDocumentedObject(), "base_category_list")
security.declareProtected(Permissions.AccessContentsInformation, 'getAcquireLocalRoles') security.declareProtected(Permissions.AccessContentsInformation, 'getAcquireLocalRoles')
def getAcquireLocalRoles(self): def getAcquireLocalRoles(self):
""" """
Returns the list of allowed content type for the documentation helper Returns the list of allowed content type for the documentation helper
""" """
local_roles = getattr(self.getDocumentedObject(), "acquire_local_roles", '') local_roles = getattr(self.getDocumentedObject(), "acquire_local_roles")
if local_roles: if local_roles:
return 'Yes' return 'Yes'
else: else:
...@@ -196,14 +196,14 @@ class PortalTypeDocumentationHelper(DocumentationHelper): ...@@ -196,14 +196,14 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
""" """
Returns the list of groups for the documentation helper Returns the list of groups for the documentation helper
""" """
return getattr(self.getDocumentedObject(), "group_list", []) return getattr(self.getDocumentedObject(), "group_list")
security.declareProtected(Permissions.AccessContentsInformation, 'getActionIdList') security.declareProtected(Permissions.AccessContentsInformation, 'getActionIdList')
def getActionIdList(self): def getActionIdList(self):
""" """
""" """
action_list = [] action_list = []
actions = getattr(self.getDocumentedObject(), "_actions", []) actions = getattr(self.getDocumentedObject(), "_actions")
for action in actions: for action in actions:
action_list.append(action.getId()) action_list.append(action.getId())
return action_list return action_list
...@@ -233,7 +233,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper): ...@@ -233,7 +233,7 @@ class PortalTypeDocumentationHelper(DocumentationHelper):
""" """
""" """
role_list = [] role_list = []
roles = getattr(self.getDocumentedObject(), "_roles", '') roles = getattr(self.getDocumentedObject(), "_roles")
for role in roles: for role in roles:
role_list.append(role.Title()) role_list.append(role.Title())
return role_list return role_list
......
...@@ -50,13 +50,13 @@ class PortalTypeRoleDocumentationHelper(DocumentationHelper): ...@@ -50,13 +50,13 @@ class PortalTypeRoleDocumentationHelper(DocumentationHelper):
""" """
Returns the list of categories for the role Returns the list of categories for the role
""" """
return getattr(self.getDocumentedObject(), "category", '') return getattr(self.getDocumentedObject(), "category")
security.declareProtected(Permissions.AccessContentsInformation, 'getBaseCategoryScript') security.declareProtected(Permissions.AccessContentsInformation, 'getBaseCategoryScript')
def getBaseCategoryScript(self): def getBaseCategoryScript(self):
""" """
Returns the base category script of the role Returns the base category script of the role
""" """
return getattr(self.getDocumentedObject(), "base_category_script", '') return getattr(self.getDocumentedObject(), "base_category_script")
InitializeClass(PortalTypeRoleDocumentationHelper) InitializeClass(PortalTypeRoleDocumentationHelper)
...@@ -50,7 +50,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper): ...@@ -50,7 +50,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
""" """
Returns the title of the documentation helper Returns the title of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "_params", '') return getattr(self.getDocumentedObject(), "_params")
security.declareProtected(Permissions.AccessContentsInformation, 'getSourceCode') security.declareProtected(Permissions.AccessContentsInformation, 'getSourceCode')
def getSourceCode(self): def getSourceCode(self):
...@@ -58,7 +58,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper): ...@@ -58,7 +58,7 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
Returns the source code the script python Returns the source code the script python
""" """
from zLOG import LOG, INFO from zLOG import LOG, INFO
source_code = getattr(self.getDocumentedObject(), "_body", '') source_code = getattr(self.getDocumentedObject(), "_body")
portal_transforms = getattr(self, 'portal_transforms', None) portal_transforms = getattr(self, 'portal_transforms', None)
if portal_transforms is not None: if portal_transforms is not None:
REQUEST = getattr(self, 'REQUEST', None) REQUEST = getattr(self, 'REQUEST', None)
......
...@@ -43,14 +43,14 @@ class SkinFolderItemDocumentationHelper(DocumentationHelper): ...@@ -43,14 +43,14 @@ class SkinFolderItemDocumentationHelper(DocumentationHelper):
""" """
Returns the type of the documentation helper Returns the type of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "meta_type", '') return getattr(self.getDocumentedObject(), "meta_type")
security.declareProtected(Permissions.AccessContentsInformation, 'getContentType') security.declareProtected(Permissions.AccessContentsInformation, 'getContentType')
def getContentType(self): def getContentType(self):
""" """
Returns the title of the documentation helper Returns the title of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "content_type", '') return getattr(self.getDocumentedObject(), "content_type")
InitializeClass(SkinFolderItemDocumentationHelper) InitializeClass(SkinFolderItemDocumentationHelper)
...@@ -57,7 +57,7 @@ class WorkflowMethodDocumentationHelper(DocumentationHelper): ...@@ -57,7 +57,7 @@ class WorkflowMethodDocumentationHelper(DocumentationHelper):
Returns the title of the documentation helper Returns the title of the documentation helper
""" """
# XXX May return _doNothing # XXX May return _doNothing
return getattr(self.getDocumentedObject(), "_transition_id", '') return getattr(self.getDocumentedObject(), "_transition_id")
security.declareProtected(Permissions.AccessContentsInformation, 'getDefinition') security.declareProtected(Permissions.AccessContentsInformation, 'getDefinition')
def getDefinition(self): def getDefinition(self):
......
...@@ -51,7 +51,7 @@ class ZSQLMethodDocumentationHelper(DocumentationHelper): ...@@ -51,7 +51,7 @@ class ZSQLMethodDocumentationHelper(DocumentationHelper):
Returns the source code of the documentation helper Returns the source code of the documentation helper
""" """
from zLOG import LOG, INFO from zLOG import LOG, INFO
source_code = getattr(self.getDocumentedObject(), "src", '') source_code = getattr(self.getDocumentedObject(), "src")
portal_transforms = getattr(self, 'portal_transforms', None) portal_transforms = getattr(self, 'portal_transforms', None)
if portal_transforms is not None: if portal_transforms is not None:
REQUEST = getattr(self, 'REQUEST', None) REQUEST = getattr(self, 'REQUEST', None)
...@@ -72,34 +72,34 @@ class ZSQLMethodDocumentationHelper(DocumentationHelper): ...@@ -72,34 +72,34 @@ class ZSQLMethodDocumentationHelper(DocumentationHelper):
""" """
Returns the title of the documentation helper Returns the title of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "connection_id", '') return getattr(self.getDocumentedObject(), "connection_id")
security.declareProtected(Permissions.AccessContentsInformation, 'getArgumentList') security.declareProtected(Permissions.AccessContentsInformation, 'getArgumentList')
def getArgumentList(self): def getArgumentList(self):
""" """
Returns the arguments of the documentation helper Returns the arguments of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "arguments_src", []) return getattr(self.getDocumentedObject(), "arguments_src")
security.declareProtected(Permissions.AccessContentsInformation, 'getClassName') security.declareProtected(Permissions.AccessContentsInformation, 'getClassName')
def getClassName(self): def getClassName(self):
""" """
Returns the class name of the documentation helper Returns the class name of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "class_name_", '') return getattr(self.getDocumentedObject(), "class_name_")
security.declareProtected(Permissions.AccessContentsInformation, 'getClassFile') security.declareProtected(Permissions.AccessContentsInformation, 'getClassFile')
def getClassFile(self): def getClassFile(self):
""" """
Returns the class file of the documentation helper Returns the class file of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "class_file_", '') return getattr(self.getDocumentedObject(), "class_file_")
security.declareProtected(Permissions.AccessContentsInformation, 'getMaxRows') security.declareProtected(Permissions.AccessContentsInformation, 'getMaxRows')
def getMaxRows(self): def getMaxRows(self):
""" """
Returns the of the documentation helper Returns the of the documentation helper
""" """
return getattr(self.getDocumentedObject(), "max_rows_", '') return getattr(self.getDocumentedObject(), "max_rows_")
InitializeClass(ZSQLMethodDocumentationHelper) InitializeClass(ZSQLMethodDocumentationHelper)
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