[Libreoffice-commits] core.git: scripting/source

Werner Tietz karlooforum at arcor.de
Wed Apr 12 15:33:34 UTC 2017


 scripting/source/pyprov/pythonscript.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 7ef47336411389ac492729bef52fe62aebe90f5a
Author: Werner Tietz <karlooforum at arcor.de>
Date:   Tue Apr 11 01:51:11 2017 +0200

    tdf#92007 python scripts with tuple-assignments fails on access from GUI
    
    Change-Id: Ice1d7d92cec56751cb26cbb31a5995ab30895125
    Reviewed-on: https://gerrit.libreoffice.org/36399
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 406693266f45..4803d0bebc23 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -405,7 +405,12 @@ class ProviderContext:
                 allFuncs.append(node.name)
             elif isinstance(node, ast.Assign):
                 for target in node.targets:
-                    if target.id == "g_exportedScripts":
+                    try:
+                        identifier = target.id
+                    except AttributeError:
+                        identifier = ""
+                        pass
+                    if identifier == "g_exportedScripts":
                         for value in node.value.elts:
                             g_exportedScripts.append(value.id)
                         return g_exportedScripts


More information about the Libreoffice-commits mailing list