[lttng-dev] [UST PATCH] Make lttng-gen-tp work on python 2.6

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Mar 6 16:09:39 EST 2012


* Yannick Brosseau (yannick.brosseau at gmail.com) wrote:
> (refs #114)

merged, thanks!

Mathieu

> 
> Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
> ---
>  tools/lttng-gen-tp |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp
> index 3f28534..828bee6 100755
> --- a/tools/lttng-gen-tp
> +++ b/tools/lttng-gen-tp
> @@ -158,9 +158,11 @@ class TemplateFile:
>          self.text = f.read()
>  
>          #Remove # comments (from input and output file
> -        self.text = re.sub("#.*$","",self.text,flags=re.MULTILINE)
> +        removeComments = re.compile("#.*$",flags=re.MULTILINE)
> +        self.text = removeComments.sub("",self.text)
>          #Remove // comments
> -        nolinecomment = re.sub("\/\/.*$","",self.text,flags=re.MULTILINE)
> +        removeLineComment = re.compile("\/\/.*$",flags=re.MULTILINE)
> +        nolinecomment = removeLineComment.sub("",self.text)
>          #Remove all spaces and lines
>          cleantext = re.sub("\s*","",nolinecomment)
>          #Remove multine C style comments
> -- 
> 1.7.9.1
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list