Skip to content

Commit

Permalink
Python3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
janjaapdriessen committed Sep 28, 2016
1 parent 17283c0 commit 270ac0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/grokcore/view/templatereg.py
Expand Up @@ -242,7 +242,7 @@ def lookup(module_info, template_name, mark_as_associated=False):
try:
return file_template_registry.lookup(
module_info, template_name, mark_as_associated)
except TemplateLookupError, e:
except TemplateLookupError as e:
try:
return inline_template_registry.lookup(
module_info, template_name, mark_as_associated)
Expand Down
5 changes: 3 additions & 2 deletions src/grokcore/view/testing.py
Expand Up @@ -13,6 +13,7 @@
##############################################################################
"""Grok test helpers
"""
from __future__ import print_function
import sys
import grokcore.view
from zope.configuration.config import ConfigurationMachine
Expand Down Expand Up @@ -42,7 +43,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 @@ -62,4 +63,4 @@ def warn(message, category=None, stacklevel=1):
line.strip(),
)
grokcore.view.testing.lastwarning += warning
print warning
print(warning)

0 comments on commit 270ac0a

Please sign in to comment.