[Zope] export Z_DEBUG_MODE=no -- broken?

Martijn Pieters mj@digicool.com
Thu, 24 Feb 2000 05:56:16 -0500


From: Michael Hamilton [mailto:michael@actrix.gen.nz]
> 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.

Start Zope up with the -D switch. It'll take care of this.

-- 
Martijn Pieters, Software Engineer 
| Digital Creations http://www.digicool.com 
| Creators of Zope      http://www.zope.org 
| mailto:mj@digicool.com       ICQ: 4532236
| PGP:
http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
-------------------------------------------