Fix bug in print_attribute.

When the attribute had no values an exception was generated while
trying to word-wrap it.
This commit is contained in:
Pavel Zuna authored and Rob Crittenden committed 2009-10-23 09:37:23 -04:00
1 parent 81f8c5f0db
commit 04c5b5ae42
1 file changed
+1 -1
+1 -1
View File
@@ -263,7 +263,7 @@ class textui(backend.Backend):
else:
text = ', '.join(value)
line_len = self.get_tty_width()
if line_len:
if line_len and text:
s_indent = '%s%s' % (
CLI_TAB * indent, ' ' * (len(attr) + 2)
)