ScriptForge prettyprint in APSO 1.4.4

The latest version of APSO (1.4.4) introduces
a new positional argument in the
  def console():
in apso_utile.py, named 'prettyprint'.

The def is used in
  SF_Exception.PythonShell()

The absence of the argument caused
an exception/regression.
The actual patch makes above method compatible
with latest and previous versions of APSO.

No impact on user scripts.
No impact on user documentation.

Change-Id: I0a90112d441bba550b330925742e5021665ecee6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183265
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
This commit is contained in:
Jean-Pierre Ledure
2025-03-25 17:23:16 +01:00
parent d57c777801
commit 300ed95296
@@ -1126,9 +1126,9 @@ class SFScriptForge:
ctx.ServiceManager.createInstance('apso.python.script.organizer.impl')
# now we can use apso_utils library
from apso_utils import console
kwargs = {'loc': variables}
kwargs = {'loc': variables, 'BACKGROUND': background, 'FOREGROUND': foreground, 'prettyprint': False}
kwargs['loc'].setdefault('XSCRIPTCONTEXT', uno)
console(BACKGROUND = background, FOREGROUND = foreground, **kwargs)
console(**kwargs)
# An interprocess call is necessary to allow a redirection of STDOUT and STDERR by APSO
# Choice is a minimalist call to a Basic routine: no arguments, a few lines of code
SFScriptForge.SF_Basic.GetGuiType()