Skip to content

Commit

Permalink
doxy2swig fix for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed Mar 10, 2016
1 parent 7eb766e commit 6539521
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/.doxy2swig.py
Expand Up @@ -29,6 +29,7 @@
######################################################################

from xml.dom import minidom
import sys
import re
import textwrap
import sys
Expand Down Expand Up @@ -387,7 +388,10 @@ def write(self, fname):
o = my_open_write(fname)
try:
data = self.pieces if self.multi else self.clean_pieces(self.pieces)
o.write(str("".join(data).encode("UTF-8")))
if sys.version_info >= (3, 0):
o.write("".join(data))
else:
o.write(u"".join(data).encode('utf-8'))
finally:
o.close()

Expand Down

0 comments on commit 6539521

Please sign in to comment.