diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2014-08-12 23:56:55 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2014-08-12 23:56:55 -0400 |
| commit | 3997fca46bed4c7c6845c4afc70d5e2abf4ead6b (patch) | |
| tree | 24e79621112ad6083b407e1f3fe0e190dbef9b5f | |
| parent | 38522eb9734aa9f22f5aee46560d99e563ecb53b (diff) | |
| download | tabletext-3997fca46bed4c7c6845c4afc70d5e2abf4ead6b.tar.gz | |
Fix small bug, the if was never executed because of unicode litterals
| -rw-r--r-- | tabletext.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tabletext.py b/tabletext.py index 049fcf7..34b1b2f 100644 --- a/tabletext.py +++ b/tabletext.py @@ -60,8 +60,8 @@ def print_table(table, formats=None, padding=(1, 1), corners="┌┬┐├┼┤ header=False, hor="─", ver="│"): if not formats: formats = [""] * len(table[-1]) - elif type(formats) is str: - formats = formats * len(table[-1]) + elif type(formats) is unicode: + formats = [formats] * len(table[-1]) if len(corners) == 1: corners = corners * 9 widths = get_widths(table, formats, padding) |
