More fixes to 9b6b336 patch

- Last commit was bogus
This commit is contained in:
Salvador E. Tropea 2022-05-26 11:40:42 -03:00
parent 9d9ce72d8d
commit 79a8b53f4e
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,6 @@ def check_version(command, version):
if command in script_versions:
return
cmd = [command, '--version']
logger.error(which(command))
if not which(command) and not os.access(command, os.X_OK) and command.endswith('.py'):
cmd.insert(0, 'python3')
logger.debug('Running: '+str(cmd))

View File

@ -5,6 +5,7 @@
# Project: KiBot (formerly KiPlot)
import os
from subprocess import (check_output, STDOUT, CalledProcessError)
from shutil import which
from .misc import (CMD_IBOM, URL_IBOM, BOM_ERROR, W_EXTNAME, ToolDependency, ToolDependencyRole, W_NONETLIST)
from .gs import (GS)
from .kiplot import check_script, search_as_plugin
@ -162,7 +163,7 @@ class IBoMOptions(VariantOptions):
else:
output_dir = name
cmd = [tool, GS.pcb_file, '--dest-dir', output_dir, '--no-browser', ]
if not os.access(tool, os.X_OK):
if not which(tool) and not os.access(tool, os.X_OK):
# Plugin could be installed without execute flags
cmd.insert(0, 'python3')
# Check if the user wants extra_fields but there is no data about them (#68)