diff --git a/extensions/fablabchemnitz/jpeg_export/jpeg_export.py b/extensions/fablabchemnitz/jpeg_export/jpeg_export.py index ad069a63..ba4b4450 100644 --- a/extensions/fablabchemnitz/jpeg_export/jpeg_export.py +++ b/extensions/fablabchemnitz/jpeg_export/jpeg_export.py @@ -18,7 +18,6 @@ import os import re -from distutils.spawn import find_executable import subprocess import math import inkex @@ -173,10 +172,10 @@ class JPEGExport(inkex.EffectExtension): if os.name == 'nt': outfile = outfile.replace("\\","\\\\") # set the ImageMagick command to run based on what's installed - if find_executable('magick'): + if shutil.which('magick'): command = "magick \"%sjpinkexp.png\" -sampling-factor 4:4:4 -strip -interlace JPEG -colorspace RGB -quality %s -density %s \"%s\" " % (tmp, self.options.quality, self.options.density, outfile) # inkex.utils.debug(command) - elif find_executable('convert'): + elif shutil.which('convert'): command = "convert \"%sjpinkexp.png\" -sampling-factor 4:4:4 -strip -interlace JPEG -colorspace RGB -quality %s -density %s \"%s\" " % (tmp, self.options.quality, self.options.density, outfile) # inkex.utils.debug(command) else: