Commit 2cf8215f authored by Fred Drake's avatar Fred Drake

Access the key that was looked up in a way that will result in the

same output for both Python 2.2 and 2.3.

Python 2.3 changes the str() of KeyError exceptions to return a repr()
of the key instead of the str() of the key, which caused quotes to be
generated if we don't pick out just the key.
parent fd809b39
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<p tal:attributes="name y/z | python:'||'[:0]">Z</p> <p tal:attributes="name y/z | python:'||'[:0]">Z</p>
<p tal:attributes="name y/z | nothing">Z</p> <p tal:attributes="name y/z | nothing">Z</p>
<p tal:on-error="python:str(error.value)" tal:content="a/b | c/d">Z</p> <p tal:on-error="python:str(error.value[0])" tal:content="a/b | c/d">Z</p>
</div> </div>
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment