Loading ...
Sorry, an error occurred while loading the content.

4262Re: [Cheetahtemplate-discuss] [PATCH] Fix test, and correct the error cast in the compiler

Expand Messages
  • R. Tyler Ballance
    Jan 5, 2009
      Looks like my cover letter got gobbled up in transit, here it is anyways

      From R. Tyler Ballance <tyler@...>
      Subject: Patch to fix broken #import behavior

      Files changed:
      M src/Compiler.py
      M src/Tests/Template.py

      The following two patches are meant to fix broken behavior with #import
      particularly when wrapped within #try/#except/#end try blocks in Cheetah

      Take the following markup for example:
      #import cjson
      #except ImportError
      #import simplejson
      #end try

      Before the addition of the patch, this is what would be generated:
      import cjson
      import simplejson

      except ImportError

      Cheetah will now generate this code instead:
      import cjson
      except ImportError:
      import simplejson

      I generated the series of patches against my Git clone of the Cheetah
      CVS tree (https://github.com/rtyler/cheetah/tree) in case anybody is
      interesting in working with Cheetah in Git :)

      I'd appreciate any comments, testing and/or code review any of you
      seasoned Cheetah developers have to offer, as this is clearly my first
      Cheetah patch ;)

      -R. Tyler Ballance
      Slide, Inc.
    • Show all 2 messages in this topic