beremiz
Clone
Summary
Browse
Changes
Graph
found installed Inkscape on Windows
2017-09-12, Andrey Skvortsov
58ff55053518
Parents
1711339585ce
Children
74a3f4d5f407
found installed Inkscape on Windows
tested with Inkscape version 0.9 on Windows 7.
1 files changed, 6 insertions(+), 2 deletions(-)
+6
-2
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('"', '')