update for Pathops

This commit is contained in:
Mario Voigt 2021-10-10 23:29:49 +02:00
parent 74bc089594
commit 6ba6e1ba7c

View File

@ -63,7 +63,11 @@ def timed(f):
def get_inkscape_version(): def get_inkscape_version():
ink = inkex.command.INKSCAPE_EXECUTABLE_NAME ink = inkex.command.INKSCAPE_EXECUTABLE_NAME
try: # needed prior to 1.1
ink_version = inkex.command.call(ink, '--version').decode("utf-8") ink_version = inkex.command.call(ink, '--version').decode("utf-8")
except AttributeError: # needed starting from 1.1
ink_version = inkex.command.call(ink, '--version')
pos = ink_version.find("Inkscape ") pos = ink_version.find("Inkscape ")
if pos != -1: if pos != -1:
pos += 9 pos += 9