/[opental]/opental/OpenTAL/metal_handler.py
ViewVC logotype

Diff of /opental/OpenTAL/metal_handler.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by lalo, Fri Feb 21 05:07:02 2003 UTC revision 1.19 by lalo, Mon Apr 28 18:15:14 2003 UTC
# Line 94  class MetalError(Exception): Line 94  class MetalError(Exception):
94  def handle_use_macro(element, context, value):  def handle_use_macro(element, context, value):
95      value = getattr(element, 'metal_macro', value)      value = getattr(element, 'metal_macro', value)
96      macro = context.evaluateMacro(value)      macro = context.evaluateMacro(value)
97        if hasattr(context, 'getDefault') and macro is context.getDefault():
98            return element
99        if macro is None:
100            return None
101      try:      try:
102          [a for a in macro.children]          [a for a in macro.children]
103      except:      except:
104          raise MetalError, ('trying to use an incompatible object as a macro: ' +          raise MetalError, ('trying to use an incompatible object as a macro: ' +
105                             repr(macro))                             repr(macro))
     if hasattr(context, 'getDefault') and macro is context.getDefault():  
         return element  
106      context.metal_slot_stack[-1] = fish_slots(element)      context.metal_slot_stack[-1] = fish_slots(element)
107      result = macro.copy()      result = macro.copy()
108      metal = result.attributes[metal_ns]      metal = result.attributes[metal_ns]

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26