From 3997fca46bed4c7c6845c4afc70d5e2abf4ead6b Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Tue, 12 Aug 2014 23:56:55 -0400 Subject: Fix small bug, the if was never executed because of unicode litterals --- tabletext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tabletext.py') 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) -- cgit v1.2.3-70-g09d2