python 3.2 does not have a unicode type so ignore the error if it is missing

This commit is contained in:
Doug Hellmann
2012-05-04 13:17:41 -04:00
parent 69324f49d8
commit 5315a67c13

View File

@@ -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(