Fix a crash with non-ascii paths. Fixes #638

This commit is contained in:
dmiller 2017-02-05 05:56:20 +00:00
parent 1c4dc13f27
commit 4a42504cc2

View file

@ -204,7 +204,7 @@ class ScriptHelpXMLContentHandler (xml.sax.handler.ContentHandler):
if u"path" not in attrs:
raise ValueError(
u'"directory" element did not have "path" attribute')
path = attrs[u"path"]
path = attrs[u"path"].encode("raw_unicode_escape").decode(sys.getfilesystemencoding())
if dirname == u"scripts":
self.scripts_dir = path
elif dirname == u"nselib":