Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper warnings on broken transform #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Products/PortalTransforms/transforms/broken.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from Products.PortalTransforms.utils import log
from zope.interface import implementer


WARNING = 100
import logging


@implementer(ITransform)
Expand All @@ -26,8 +25,7 @@ def convert(self, orig, data, **kwargs):
# do the format
msg = "Calling convert on BROKEN transform %s (%s). Error: %s" % \
(self.id, self.module, self.error)
log(msg, severity=WARNING)
print(msg)
log(msg, severity=logging.WARNING)
data.setData('')
return data

Expand Down
2 changes: 2 additions & 0 deletions news/19.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix: Improper warnings on broken transform
[ewohnlich, jensens]