[Set Text Variables] Added more debug information
This commit is contained in:
parent
abb0989a2a
commit
b8529e7b6f
|
|
@ -13,6 +13,7 @@ Dependencies:
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import shlex
|
||||||
from subprocess import run, PIPE
|
from subprocess import run, PIPE
|
||||||
import sys
|
import sys
|
||||||
from .error import KiPlotConfigurationError
|
from .error import KiPlotConfigurationError
|
||||||
|
|
@ -127,9 +128,11 @@ class Set_Text_Variables(BasePreFlight): # noqa: F821
|
||||||
if not bash_command:
|
if not bash_command:
|
||||||
bash_command = self.ensure_tool('Bash')
|
bash_command = self.ensure_tool('Bash')
|
||||||
cmd = [bash_command, '-c', command]
|
cmd = [bash_command, '-c', command]
|
||||||
|
logger.debug('Executing: '+shlex.join(command))
|
||||||
result = run(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
result = run(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
||||||
if result.returncode:
|
if result.returncode:
|
||||||
logger.error('Failed to execute:\n{}\nreturn code {}'.format(r.command, result.returncode))
|
logger.error('Failed to execute:\n{}\nreturn code {}'.format(r.command, result.returncode))
|
||||||
|
logger.error('stdout:\n{}\nstderr:\n{}'.format(result.stdout, result.stderr))
|
||||||
sys.exit(FAILED_EXECUTE)
|
sys.exit(FAILED_EXECUTE)
|
||||||
if not result.stdout:
|
if not result.stdout:
|
||||||
logger.warning(W_EMPTREP+"Empty value from `{}`".format(r.command))
|
logger.warning(W_EMPTREP+"Empty value from `{}`".format(r.command))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue