Skip to content

Commit

Permalink
toplev: Fix --no-desc in CSV mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Feb 3, 2015
1 parent b26dc28 commit 05767fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ def __init__(self, logfile, csv):

def s(self, area, hdr, s, remark, desc, sample):
remark = self.csv + remark
if args.no_desc:
desc = ""
if desc and sample:
desc += " Sampling events: " + sample
desc = self.csv + '"' + desc + '"'
desc = re.sub(r"\s+", " ", desc)
print >>self.logf, '%s%s%s%s%s%s%s' % (hdr, self.csv, s.strip(), remark, desc, self.csv, sample)
Expand Down

0 comments on commit 05767fb

Please sign in to comment.