Fixed problems with iBoM version detection

- Now we avoid the wxWidgets initialization
This commit is contained in:
Salvador E. Tropea 2022-06-30 11:04:01 -03:00
parent 65bd4447fb
commit 200b54aaf7
2 changed files with 6 additions and 1 deletions

View File

@ -244,6 +244,9 @@ def main():
# Now we have the debug level set we can check (and optionally inform) KiCad info
detect_kicad()
# Force iBoM to avoid the use of graphical stuff
os.environ['INTERACTIVE_HTML_BOM_NO_DISPLAY'] = 'True'
# Parse global overwrite options
for redef in args.global_redef:
if '=' not in redef:

View File

@ -444,10 +444,12 @@ def run_command(cmd, only_first_line=False, pre_ver_text=None, no_err_2=False):
res_run = subprocess.run(cmd, check=True, capture_output=True)
except subprocess.CalledProcessError as e:
if e.returncode != 2 or not no_err_2:
logger.debug('- Failed to run %s, error %d' % (cmd[0], e.returncode))
logger.debug('- Failed to run {}, error {}'.format(cmd, e.returncode))
last_stderr = e.stderr.decode()
if e.output:
logger.debug('- Output from command: '+e.output.decode())
if last_stderr:
logger.debug('- StdErr from command: '+last_stderr)
return None
except Exception as e:
logger.debug('- Failed to run {}, error {}'.format(cmd[0], e))