diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-05-04 13:17:41 -0400 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-05-04 13:17:41 -0400 |
commit | 5315a67c13c72bc9b4ffa27e8307fa64b73d9543 (patch) | |
tree | 92201bbe421beabcf2cfb78ce83523617d6f03b5 /cliff/formatters | |
parent | 69324f49d857aec18553f5ee5ac7b5d81f37ea0f (diff) | |
download | cliff-tablib-5315a67c13c72bc9b4ffa27e8307fa64b73d9543.tar.gz |
python 3.2 does not have a unicode type so ignore the error if it is missing
Diffstat (limited to 'cliff/formatters')
-rw-r--r-- | cliff/formatters/table.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cliff/formatters/table.py b/cliff/formatters/table.py index b7e978a..298c5f7 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( |