improve text formatter
This commit is contained in:
parent
4cc065e05f
commit
e8be6f7794
1 changed files with 2 additions and 5 deletions
|
|
@ -79,11 +79,8 @@ class TextFormatter(object):
|
||||||
if header[i]:
|
if header[i]:
|
||||||
formatted_cols.append(u'%s: %s' % (header[i], col))
|
formatted_cols.append(u'%s: %s' % (header[i], col))
|
||||||
else:
|
else:
|
||||||
formatted_cols.append(col)
|
formatted_cols.append(unicode(col))
|
||||||
if len(formatted_cols) == 2:
|
formatted += u'%s\n' % u' '.join(formatted_cols)
|
||||||
formatted += u'%s: %s\n' % (formatted_cols[0], formatted_cols[1])
|
|
||||||
else:
|
|
||||||
formatted += u'%s\n' % u' '.join(formatted_cols)
|
|
||||||
return unicode(formatted).strip()
|
return unicode(formatted).strip()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue