strip() strips all characters listed in the given string, replace() simply replaces the string with another (in this case the empty string), the latter is clearly what was intended here.
This fixes the sort last option being mangled Change-Id: Ic491f159339637cc2959e19c9c37be1cc31e4833 Signed-off-by: Scott James Remnant <[email protected]> --- client/profilers/perf/perf.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py index e6f9bb7..90c33b8 100644 --- a/client/profilers/perf/perf.py +++ b/client/profilers/perf/perf.py @@ -25,7 +25,7 @@ class perf(profiler.profiler): for line in perf_help.split('\n'): a = "sort by key(s):" if a in line: - line = line.strip(a) + line = line.replace(a, "") self.sort_keys = [k.rstrip(",") for k in line.split() if k.rstrip(",") != 'dso'] if not self.sort_keys: -- 1.7.3.1 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
