Commit 8661868c authored by Evan Simpson's avatar Evan Simpson

Use Z_DEBUG instead of __debug__

parent 29c9b2e6
......@@ -87,7 +87,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL.
"""
__version__='$Revision: 1.11 $'[11:-2]
__version__='$Revision: 1.12 $'[11:-2]
import os, sys, traceback, pprint
from TAL.TALParser import TALParser
......@@ -99,6 +99,8 @@ from string import join, strip, rstrip, split, replace, lower, find
from cStringIO import StringIO
from ExtensionClass import Base
Z_DEBUG_MODE = os.environ.get('Z_DEBUG_MODE') == '1'
class MacroCollection(Base):
def __of__(self, parent):
return parent._v_macros
......@@ -145,7 +147,7 @@ class PageTemplate:
output = StringIO()
c = self.pt_getContext()
c.update(extra_context)
if __debug__:
if Z_DEBUG_MODE:
__traceback_info__ = pprint.pformat(c)
TALInterpreter(self._v_program, self._v_macros,
......
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