Fixed #12754 -- Reintroduced style.ERROR_OUTPUT as an alias for style.ERROR. Django doesn't need this itself, but it would be a backwards incompatible change to remove it. Thanks to Jeff Balogh for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-02-03 00:24:05 +00:00
parent f9a33cbfde
commit de35bb40af
1 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,9 @@ def color_style():
for role in termcolors.PALETTES[termcolors.NOCOLOR_PALETTE]: for role in termcolors.PALETTES[termcolors.NOCOLOR_PALETTE]:
format = color_settings.get(role,{}) format = color_settings.get(role,{})
setattr(style, role, termcolors.make_style(**format)) setattr(style, role, termcolors.make_style(**format))
# For backwards compatibility,
# set style for ERROR_OUTPUT == ERROR
setattr(style, 'ERROR_OUTPUT', style.ERROR)
else: else:
style = no_style() style = no_style()
return style return style