# HG changeset patch # User timothy.murphy@nokia.com # Date 1260977149 0 # Node ID 35ed82e9d5747b7beb7663a30422be3d041ba83a # Parent 55e6115d31a450e55a6a45ebfae49844fd8955e7 Strip epocroot off whatcomp filter output. diff -r 55e6115d31a4 -r 35ed82e9d574 sbsv2/raptor/python/plugins/filter_what.py --- a/sbsv2/raptor/python/plugins/filter_what.py Mon Dec 14 22:17:56 2009 +0000 +++ b/sbsv2/raptor/python/plugins/filter_what.py Wed Dec 16 15:25:49 2009 +0000 @@ -22,6 +22,10 @@ class FilterWhat(filter_interface.Filter): + def __init__(self): + super(filter_interface.Filter,self).__init__(self) + self.path_prefix_to_strip = None + print "HELLO=------" def print_file(self, line, start, end): "Ensure DOS slashes on Windows" @@ -33,6 +37,10 @@ filename = line[(start + 1):end].replace("/","\\") else: filename = line[(start + 1):end] + + if self.path_prefix_to_strip: + if filename.startswith(self.path_prefix_to_strip): + filename = filename[len(self.path_prefix_to_strip):] if self.check: if not os.path.isfile(filename): diff -r 55e6115d31a4 -r 35ed82e9d574 sbsv2/raptor/python/plugins/filter_whatcomp.py --- a/sbsv2/raptor/python/plugins/filter_whatcomp.py Mon Dec 14 22:17:56 2009 +0000 +++ b/sbsv2/raptor/python/plugins/filter_whatcomp.py Wed Dec 16 15:25:49 2009 +0000 @@ -23,11 +23,16 @@ class FilterWhatComp(filter_what.FilterWhat): + def __init__(self): + super(filter_what.FilterWhat,self).__init__() + self.path_prefix_to_strip = os.path.abspath(os.environ["EPOCROOT"]) + def write(self, text): "process some log text" + ok = True for line in text.splitlines(): - ok =filter_what.FilterWhat.write(self, line) + ok = filter_what.FilterWhat.write(self, line) if not ok: break