From 57080c9cede2e29917df7946986e5ee26134440e Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Tue, 23 Jan 2024 22:07:50 +0100 Subject: [PATCH] small enhancement in webp_import --- extensions/fablabchemnitz/webp_import/webp_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/fablabchemnitz/webp_import/webp_import.py b/extensions/fablabchemnitz/webp_import/webp_import.py index a3be68d..15a561c 100644 --- a/extensions/fablabchemnitz/webp_import/webp_import.py +++ b/extensions/fablabchemnitz/webp_import/webp_import.py @@ -25,10 +25,10 @@ class WebpImport(inkex.InputExtension): convertfile = os.path.join(tmp, "webp.png") if shutil.which('magick'): command = "magick \"%s\" \"%s\" " % (self.options.inputfile, convertfile) - elif shutil.which('convert'): + elif os.name != 'nt' and shutil.which('convert'): #on Windows this command is reserved for some HDD actions command = "convert \"%s\" \"%s\" " % (self.options.inputfile, convertfile) else: - inkex.errormsg('ImageMagick does not appear to be installed.') + inkex.errormsg('ImageMagick does not appear to be installed. Get it from https://imagemagick.org/script/download.php') exit() p = subprocess.Popen(command, shell=True) return_code = p.wait()