From e7de8e63d9013e2f7d555255b08d05d7d2560a1f Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Fri, 4 May 2012 19:13:48 -0500 Subject: reports: More pylint/pep8 fixes Signed-off-by: Sol Jerome --- .../Bcfg2/Server/Reports/reports/templatetags/syntax_coloring.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Bcfg2/Server/Reports/reports/templatetags/syntax_coloring.py b/src/lib/Bcfg2/Server/Reports/reports/templatetags/syntax_coloring.py index 7dae62cbd..36d4cf693 100644 --- a/src/lib/Bcfg2/Server/Reports/reports/templatetags/syntax_coloring.py +++ b/src/lib/Bcfg2/Server/Reports/reports/templatetags/syntax_coloring.py @@ -15,6 +15,7 @@ try: except: colorize = False + # py3k compatibility def u_str(string): if sys.hexversion >= 0x03000000: @@ -22,10 +23,12 @@ def u_str(string): else: return unicode(string) + @register.filter def syntaxhilight(value, arg="diff", autoescape=None): """ - Returns a syntax-hilighted version of Code; requires code/language arguments + Returns a syntax-hilighted version of Code; + requires code/language arguments """ if autoescape: @@ -44,6 +47,6 @@ def syntaxhilight(value, arg="diff", autoescape=None): except: return value else: - return mark_safe(u_str('
Tip: Install pygments for highlighting
%s
') % value) + return mark_safe(u_str('
Tip: Install pygments ' + 'for highlighting
%s
') % value) syntaxhilight.needs_autoescape = True - -- cgit v1.2.3-1-g7c22