Skip to content

Commit

Permalink
xml2nroff: Don't use import *.
Browse files Browse the repository at this point in the history
It's generally considered bad style to do a wildcard import.  It makes
it more difficult to figure out where things come from.

Signed-off-by: Russell Bryant <[email protected]>
Acked-by: Justin Pettit <[email protected]>
  • Loading branch information
russellb committed Dec 11, 2015
1 parent 8910414 commit d43bf6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build-aux/xml2nroff
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import os
import sys
import xml.dom.minidom

from build.nroff import *
import build.nroff

argv0 = sys.argv[0]

Expand Down Expand Up @@ -73,10 +73,10 @@ def manpage_to_nroff(xml_file, subst, version=None):
. I "\\$1"
. RE
..
''' % (text_to_nroff(program), text_to_nroff(section),
text_to_nroff(title), text_to_nroff(version))
''' % (build.nroff.text_to_nroff(program), build.nroff.text_to_nroff(section),
build.nroff.text_to_nroff(title), build.nroff.text_to_nroff(version))

s += block_xml_to_nroff(doc.childNodes) + "\n"
s += build.nroff.block_xml_to_nroff(doc.childNodes) + "\n"

return s

Expand Down Expand Up @@ -117,7 +117,7 @@ if __name__ == "__main__":

try:
s = manpage_to_nroff(args[0], subst, version)
except error.Error, e:
except build.nroff.error.Error, e:
sys.stderr.write("%s: %s\n" % (argv0, e.msg))
sys.exit(1)
for line in s.splitlines():
Expand Down

0 comments on commit d43bf6a

Please sign in to comment.