summaryrefslogtreecommitdiff
path: root/cmd2/table_creator.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/table_creator.py')
-rw-r--r--cmd2/table_creator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd2/table_creator.py b/cmd2/table_creator.py
index 38102a07..5420ebec 100644
--- a/cmd2/table_creator.py
+++ b/cmd2/table_creator.py
@@ -545,7 +545,7 @@ class SimpleTable(TableCreator):
:param column_spacing: how many spaces to place between columns. Defaults to 2.
:param tab_width: all tabs will be replaced with this many spaces. If a row's fill_char is a tab,
then it will be converted to one space.
- :param divider_char: optional character used to build the header divider row. Set this to None if you don't
+ :param divider_char: optional character used to build the header divider row. Set this to blank or None if you don't
want a divider row. Defaults to dash. (Cannot be a line breaking character)
:raises: ValueError if column_spacing is less than 0
:raises: ValueError if tab_width is less than 1
@@ -556,6 +556,9 @@ class SimpleTable(TableCreator):
raise ValueError("Column spacing cannot be less than 0")
self.inter_cell = column_spacing * SPACE
+ if divider_char == '':
+ divider_char = None
+
if divider_char is not None:
if len(ansi.strip_style(divider_char)) != 1:
raise TypeError("Divider character must be exactly one character long")