Commit d7e44496 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* we no longer use ExtensibleTraversableMixIn directly here.

* fix wrong usages of except.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39890 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c1dbfbf8
...@@ -42,7 +42,6 @@ from Products.ERP5Type.DateUtils import convertDateToHour,\ ...@@ -42,7 +42,6 @@ from Products.ERP5Type.DateUtils import convertDateToHour,\
number_of_hours_in_day, number_of_hours_in_year number_of_hours_in_day, number_of_hours_in_year
from Products.ERP5Type.Utils import convertToUpperCase, fill_args_from_request from Products.ERP5Type.Utils import convertToUpperCase, fill_args_from_request
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.ExtensibleTraversable import ExtensibleTraversableMixIn
from Products.ERP5Type.Cache import getReadOnlyTransactionCache from Products.ERP5Type.Cache import getReadOnlyTransactionCache
from Products.ERP5.Document.Url import UrlMixIn from Products.ERP5.Document.Url import UrlMixIn
from Products.ERP5.Tool.ContributionTool import MAX_REPEAT from Products.ERP5.Tool.ContributionTool import MAX_REPEAT
...@@ -892,7 +891,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo ...@@ -892,7 +891,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo
""" """
try: try:
method = self._getTypeBasedMethod('getMetadataMappingDict') method = self._getTypeBasedMethod('getMetadataMappingDict')
except KeyError, AttributeError: except (KeyError, AttributeError):
method = None method = None
if method is not None: if method is not None:
return method() return method()
...@@ -915,7 +914,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo ...@@ -915,7 +914,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo
""" """
try: try:
method = self._getTypeBasedMethod('populateContent') method = self._getTypeBasedMethod('populateContent')
except KeyError, AttributeError: except (KeyError, AttributeError):
method = None method = None
if method is not None: method() if method is not None: method()
......
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