From 0c176afccbe18eee09fbf7e67966b6a53c5b4420 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Mon, 2 Feb 2009 23:43:32 +0100 Subject: tools/trace: * Change python indentation. * Added a stop condition on reading traces. --- tools/trace/tcreator/tcreator.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tools/trace/tcreator') diff --git a/tools/trace/tcreator/tcreator.py b/tools/trace/tcreator/tcreator.py index e0624259..be771afb 100644 --- a/tools/trace/tcreator/tcreator.py +++ b/tools/trace/tcreator/tcreator.py @@ -2,26 +2,26 @@ import sys from writer import * try: - from lib.parser import * + from lib.parser import * except: - print "--> You should run yapps on lib/parser.g" + print "--> You should run yapps on lib/parser.g" class TCreator: - def __init__(self, infile, outfile, enum_name = "trace_id_t"): - self.__infile = infile - self.__outfile = outfile - self.__enum_name = enum_name + def __init__(self, infile, outfile, enum_name = "trace_id_t"): + self.__infile = infile + self.__outfile = outfile + self.__enum_name = enum_name - def create (self): - infile = open (self.__infile, 'r') - data = parse ('parser', infile.read()) - infile.close() + def create (self): + infile = open (self.__infile, 'r') + data = parse ('parser', infile.read()) + infile.close() - w = Writer (self.__outfile, self.__enum_name) - outstring = w.parse_list (data) + w = Writer (self.__outfile, self.__enum_name) + outstring = w.parse_list (data) - if self.__outfile != "": - w.write_file (outstring) - else: - w.print_file (outstring) + if self.__outfile != "": + w.write_file (outstring) + else: + w.print_file (outstring) -- cgit v1.2.3