found installed Inkscape on Windows
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 12 Sep 2017 18:32:13 +0300
changeset 1801 58ff55053518
parent 1800 1711339585ce
child 1802 74a3f4d5f407
found installed Inkscape on Windows

tested with Inkscape version 0.9 on Windows 7.
docutil/docsvg.py
--- a/docutil/docsvg.py	Tue Sep 12 16:49:35 2017 +0300
+++ b/docutil/docsvg.py	Tue Sep 12 18:32:13 2017 +0300
@@ -30,8 +30,12 @@
 def get_inkscape_path():
     """ Return the Inkscape path """
     import _winreg
-    svgexepath = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE,
-                                    'Software\\Classes\\svgfile\\shell\\Inkscape\\command')
+    try:
+        svgexepath = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE,
+                                        'Software\\Classes\\svgfile\\shell\\Inkscape\\command')
+    except WindowsError:
+        svgexepath = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE,
+                                        'Software\\Classes\\inkscape.svg\\shell\\open\\command')
     svgexepath = svgexepath.replace('"%1"', '')
     return svgexepath.replace('"', '')