Merge pull request #433 from RPi-Distro/lurch-patch-1

Default to 'full' content in __format__
This commit is contained in:
Ben Nuttall
2016-09-19 14:11:20 +01:00
committed by GitHub

View File

@@ -419,7 +419,10 @@ class Style(object):
style = 'color' if cls._term_supports_color() else 'mono'
if len(content) > 1:
raise ValueError('cannot specify more than one content element')
content = content.pop()
try:
content = content.pop()
except KeyError:
content = 'full'
return cls(style == 'color'), content
def __call__(self, format_spec):