Skip to content

Commit

Permalink
#537 python3-ism
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jun 14, 2017
1 parent c683848 commit edeaf53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/nxdl_desc2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ def getDocFromNode(ns, node, retval=None):
# be sure to grab _all_ content in the documentation
# it might look like XML
s = lxml.etree.tostring(docnodes[0], pretty_print=True)
p1 = s.find('>')+1
p2 = s.rfind('</')
text = s[p1:p2].lstrip('\n') # cut off the enclosing tag
p1 = s.decode().find('>')+1
p2 = s.decode().rfind('</')
text = s[p1:p2].decode().lstrip('\n') # cut off the enclosing tag

lines = text.splitlines()
if len(lines) > 1:
Expand Down

0 comments on commit edeaf53

Please sign in to comment.