summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Tietz <karlooforum@arcor.de>2017-04-11 01:51:11 +0200
committerMichael Stahl <mstahl@redhat.com>2017-04-12 18:31:28 +0200
commit9a6d78b722f3a49f71a680e49cf64e7cfb637c43 (patch)
treecde820793d6070cd57b9556ef2f14d9cb5a6c52c
parent244d2abb6c1bcd89cedf773d8721f62451708c3f (diff)
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@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 7ef47336411389ac492729bef52fe62aebe90f5a) Reviewed-on: https://gerrit.libreoffice.org/36483
-rw-r--r--scripting/source/pyprov/pythonscript.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 6089d14edefe..e312c6a52fbf 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