From bdca6c4b56b9951b95c02f1fc13cbc78b16eee28 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 11 Dec 2015 22:28:31 -0500 Subject: python: Resolve pep8 blank line errors. Resolve pep8 errors E302 and E303: E302 expected 2 blank lines, found 1 E303 too many blank lines (3) Signed-off-by: Russell Bryant Acked-by: Ben Pfaff --- python/build/nroff.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/build') diff --git a/python/build/nroff.py b/python/build/nroff.py index 674fdfea3..58c006c1f 100644 --- a/python/build/nroff.py +++ b/python/build/nroff.py @@ -17,6 +17,7 @@ import sys from ovs.db import error + def text_to_nroff(s, font=r'\fR'): def escape(match): c = match.group(0) @@ -56,9 +57,11 @@ def text_to_nroff(s, font=r'\fR'): s = re.sub('(-[0-9]|--|[-"\'\\\\.])', escape, s) return s + def escape_nroff_literal(s, font=r'\fB'): return font + r'%s\fR' % text_to_nroff(s, font) + def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'): if node.nodeType == node.TEXT_NODE: if to_upper: @@ -99,6 +102,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'): else: raise error.Error("unknown node %s in inline xml" % node) + def pre_to_nroff(nodes, para, font): # This puts 'font' at the beginning of each line so that leading and # trailing whitespace stripping later doesn't removed leading spaces @@ -168,6 +172,7 @@ def diagram_header_to_nroff(header_node): text_s += "\n" return pic_s, text_s + def diagram_to_nroff(nodes, para): pic_s = '' text_s = '' @@ -210,6 +215,7 @@ fillval = .2 .RE \\}""" + def block_xml_to_nroff(nodes, para='.PP'): s = '' for node in nodes: -- cgit v1.2.1