From 4a42504cc270ee551e3198730baad72e33369b46 Mon Sep 17 00:00:00 2001 From: dmiller Date: Sun, 5 Feb 2017 05:56:20 +0000 Subject: [PATCH] Fix a crash with non-ascii paths. Fixes #638 --- zenmap/zenmapGUI/ScriptInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenmap/zenmapGUI/ScriptInterface.py b/zenmap/zenmapGUI/ScriptInterface.py index 9bebeeabc..a65c92275 100644 --- a/zenmap/zenmapGUI/ScriptInterface.py +++ b/zenmap/zenmapGUI/ScriptInterface.py @@ -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":