docutil/docsvg.py
changeset 1801 58ff55053518
parent 1780 c52d1460cea8
child 1828 396da88d7b5c
--- 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('"', '')