diff options
author | Russell Bryant <russell@ovn.org> | 2015-12-10 14:08:44 -0500 |
---|---|---|
committer | Russell Bryant <russell@ovn.org> | 2015-12-11 12:01:58 -0500 |
commit | e78cd628265a3db76e59c153bd50f2db0b391c2f (patch) | |
tree | d14efb5446dcfffd3d9eb78a9118665a86b5b386 /build-aux/xml2nroff | |
parent | d43bf6a67272f5fe4ebdf3e75aed5bd6f164679c (diff) | |
download | openvswitch-e78cd628265a3db76e59c153bd50f2db0b391c2f.tar.gz |
xml2nroff: Fix issues pointed out by flake8.
This patch includes a few minor fixes pointed out by the flake8 tool.
It drops an unused variable and the related imports, adds some blank
lines where the PEP8 formatting standard indicates they should be, and
does a comparison with None as "is None" instead of "== None".
Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'build-aux/xml2nroff')
-rwxr-xr-x | build-aux/xml2nroff | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff index 2c7e9aea6..314a5e100 100755 --- a/build-aux/xml2nroff +++ b/build-aux/xml2nroff @@ -14,9 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from datetime import date import getopt -import os import sys import xml.dom.minidom @@ -24,6 +22,7 @@ import build.nroff argv0 = sys.argv[0] + def usage(): print """\ %(argv0)s: XML to nroff converter @@ -40,6 +39,7 @@ The following options are also available: """ % {'argv0': argv0} sys.exit(0) + def manpage_to_nroff(xml_file, subst, version=None): f = open(xml_file) input = [] @@ -48,9 +48,8 @@ def manpage_to_nroff(xml_file, subst, version=None): line = line.replace(k, v) input += [line] doc = xml.dom.minidom.parseString(''.join(input)).documentElement - d = date.fromtimestamp(os.stat(xml_file).st_mtime) - if version == None: + if version is None: version = "UNKNOWN" program = doc.attributes['program'].nodeValue title = doc.attributes['title'].nodeValue |