summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2012-05-04 19:13:48 -0500
committerSol Jerome <sol.jerome@gmail.com>2012-05-06 12:59:29 -0500
commite7de8e63d9013e2f7d555255b08d05d7d2560a1f (patch)
tree0f0126ea178729d43e5d2d74f6159da1eaa973eb /src
parent6d4f6eb68c2defe79036fdb514d3b8568cf129af (diff)
downloadbcfg2-e7de8e63d9013e2f7d555255b08d05d7d2560a1f.tar.gz
bcfg2-e7de8e63d9013e2f7d555255b08d05d7d2560a1f.tar.bz2
bcfg2-e7de8e63d9013e2f7d555255b08d05d7d2560a1f.zip
reports: More pylint/pep8 fixes
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Server/Reports/reports/templatetags/syntax_coloring.py9
1 files changed, 6 insertions, 3 deletions
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('<div class="note-box">Tip: Install pygments for highlighting</div><pre>%s</pre>') % value)
+ return mark_safe(u_str('<div class="note-box">Tip: Install pygments '
+ 'for highlighting</div><pre>%s</pre>') % value)
syntaxhilight.needs_autoescape = True
-