Skip to content

Commit

Permalink
python3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
janjaapdriessen committed Sep 28, 2016
1 parent c4040aa commit e609909
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/grokcore/viewlet/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from grokcore.viewlet import interfaces, util


@interface.implementer(interfaces.IViewletManager)
class ViewletManager(ViewletManagerBase):
interface.implements(interfaces.IViewletManager)

template = None

Expand Down
6 changes: 3 additions & 3 deletions src/grokcore/viewlet/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def warn(message, category=None, stacklevel=1):
When zope.deprecation is fixed, this warn function can be removed again.
"""
print "From grok.testing's warn():"
print("From grok.testing's warn():")

frame = sys._getframe(stacklevel)
path = frame.f_globals['__file__']
Expand All @@ -51,10 +51,10 @@ def warn(message, category=None, stacklevel=1):
for i in range(lineno):
line = file.readline()

print "%s:%s: %s: %s\n %s" % (
print("{}:{}: {}: {}\n {}".format(
path,
frame.f_lineno,
category.__name__,
message,
line.strip(),
)
))

0 comments on commit e609909

Please sign in to comment.