~ossug-hychen/lp-cli/trunk

« back to all changes in this revision

Viewing changes to mazo/extensions/lp_cli/__init__.py

  • Committer: Hsin-Yi Chen (hychen)
  • Date: 2012-07-24 07:41:32 UTC
  • Revision ID: hychen@canonical.com-20120724074132-ycxa67nhd4jwq520
Fix syntax error because wrong indent and don't show comment if the value of  --with-comment option is 0

Show diffs side-by-side

added added

removed removed

Lines of Context:
543
543
 
544
544
    def create_col_bugtask(self, bugtask, sep=', '):
545
545
        cols = [unicode(bugtask.bug.id), bugtask.status, bugtask.title, bugtask.web_link]
546
 
        if self.cmd_args.with_comments:
 
546
        if self.cmd_args.with_comments and self.cmd_args.with_comments > 0:
547
547
            # reorder and skip bug description
548
548
            comments = [m for m in bugtask.bug.messages][:0:-1]
549
549
            comments = comments[:self.cmd_args.with_comments]
550
 
        cols.append(u'"'+self.create_col_comments(comments)+u'"')
 
550
            cols.append(u'"'+self.create_col_comments(comments)+u'"')
551
551
        return sep.join(cols)
552
552
 
553
553
    def create_col_comments(self, comments):