I've think I just fixed a bug in the Logger product, but am not sure if it is a good fix or not. def render(self,md): subsystem = self.args['subsystem'] severity = severities[self.args['severity']] if hasattr(md,'this'): summary = self.sectionSummary(md.this,md) else: summary = self.sectionSummary(None,md) The code I stole from SendmailTag.py simply retrieved a string by using self.sectionSummary(md.this,md), but I managed to blow this up with a wierd calling path where 'md.this' didn't exist (A DTML method added to python class with HTMLFile calling a DTML method defined in ZODB). So I added the 'if hasattr' section. Does this indicate a bug in SendmailTag, or in whatever constructs the md object? I havn't been able to trace this strange md object yet but I suspect it is buried in cDocumentTemplate.c (*shudder*). ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
Stuart 'Zen' Bishop wrote:
Does this indicate a bug in SendmailTag, or in whatever constructs the md object? I havn't been able to trace this strange md object yet but I suspect it is buried in cDocumentTemplate.c (*shudder*).
md is a MultiMapping. It is implimented in C and python (look in pDocumentTemplate.py). Zope uses the C one, the python one is just hangin' around (the C one can be found in lib/Components/ExtensionClass). 'md' is usualy refered to in the DTML world as the 'DTML namespace stack'. -Michel
participants (2)
-
Michel Pelletier -
Stuart 'Zen' Bishop