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

Bug of reporting of macro expansion error. #2

Closed
karpierz opened this issue Apr 29, 2014 · 2 comments
Closed

Bug of reporting of macro expansion error. #2

karpierz opened this issue Apr 29, 2014 · 2 comments

Comments

@karpierz
Copy link

--- zope/pagetemplate/pagetemplate.py.org   2014-04-29 09:57:35.000000000 +0200
+++ zope/pagetemplate/pagetemplate.py   2014-04-29 11:38:05.251600000 +0200
@@ -193,7 +193,7 @@
                 return self.pt_render(context, source=1)
             except:
                 return (bs('%s\n Macro expansion failed\n %s\n-->\n' %
-                           (_error_start, "%s: %s" % sys.exc_info()[:2])) +
+                           (self._error_start, "%s: %s" % sys.exc_info()[:2])) +
                         self._text)

         return bs('%s\n %s\n-->\n' % (self._error_start,
@mgedmin
Copy link
Member

mgedmin commented Apr 29, 2014

Thank you for the bug report!

It would be awesome to have a failing test demonstrating the bug, to prevent regressions.

@mgedmin
Copy link
Member

mgedmin commented Apr 30, 2014

Looks like this bug was introduced in commit 8b38b26, where _error_start got moved from a module global to a class attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants