[Zope] export Z_DEBUG_MODE=no -- broken?
Tres Seaver
tseaver@palladion.com
Thu, 24 Feb 2000 10:25:31 -0600
Michael Hamilton <michael@actrix.gen.nz> asked:
> To: zope@zope.org
> Subject:
>
> Inside lib/python/ZPublisher/HTTPResponse.py there is the following code:
>
> def _traceback(self,t,v,tb):
> tb=self.format_exception(t,v,tb,200)
> tb=join(tb,'\n')
> tb=self.quoteHTML(tb)
> if self.debug_mode: _tbopen, _tbclose = '<PRE>', '</PRE>'
> else: _tbopen, _tbclose = '<!--', '-->'
> return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose)
>
> which seems to be a way of switching off traceback dumps in the browser
> window and have them wind up in an html comment instead.
>
> How do I enable this feature. I tried setting Z_DEBUG_MODE to something
> other that 1 or yes, but it doesn't seem to do anything.
>
> If I manually hack the above code to force debug_mode off, then it does
> what I want.
Martijn Pieters <mj@digicool.com> replied:
>
> Start Zope up with the -D switch. It'll take care of this.
Actually, I think what Michael wants is to *remove* the "-D" from the start
script (to force the traceback into the comment, instead of being displayed).
Tres.
--
=========================================================
Tres Seaver tseaver@palladion.com 713-523-6582
Palladion Software http://www.palladion.com