From 5315a67c13c72bc9b4ffa27e8307fa64b73d9543 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 4 May 2012 13:17:41 -0400 Subject: [PATCH] python 3.2 does not have a unicode type so ignore the error if it is missing --- cliff/formatters/table.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cliff/formatters/table.py b/cliff/formatters/table.py index b7e978a8..298c5f7b 100644 --- a/cliff/formatters/table.py +++ b/cliff/formatters/table.py @@ -11,9 +11,12 @@ class TableFormatter(ListFormatter, SingleFormatter): ALIGNMENTS = { int: 'r', str: 'l', - unicode: 'l', float: 'r', } + try: + ALIGNMENTS[unicode] = 'l' + except NameError: + pass def add_argument_group(self, parser): group = parser.add_argument_group(