Skip to content

Commit

Permalink
Create debug entry if datum for attribute cannot be determined
Browse files Browse the repository at this point in the history
  • Loading branch information
andbag committed May 24, 2019
1 parent 5f709ac commit 5f6c287
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Products/PluginIndexes/KeywordIndex/KeywordIndex.py
Expand Up @@ -127,6 +127,13 @@ def _get_object_keywords(self, obj, attr):
try:
newKeywords = newKeywords()
except (AttributeError, TypeError):
LOG.debug('%(context)s: Cannot determine datum for attribute '
'%(attr)s of object %(obj)r', dict(
context=self.__class__.__name__,
attr=attr,
obj=obj),
exc_info=True)

return missing

if newKeywords is None:
Expand Down
7 changes: 7 additions & 0 deletions src/Products/PluginIndexes/unindex.py
Expand Up @@ -365,6 +365,13 @@ def _get_object_datum(self, obj, attr):
if safe_callable(datum):
datum = datum()
except (AttributeError, TypeError):
LOG.debug('%(context)s: Cannot determine datum for attribute '
'%(attr)s of object %(obj)r', dict(
context=self.__class__.__name__,
attr=attr,
obj=obj),
exc_info=True)

if self.providesSpecialIndex(missing):
return missing
return _marker
Expand Down

0 comments on commit 5f6c287

Please sign in to comment.