6a982332b4
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=380
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From 3cf65156695b965e38f0fd4cacfc9f07e1cd6e17 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
|
Date: Thu, 3 Mar 2016 13:55:34 +0100
|
|
Subject: [PATCH] Fix python2 build of pyuno with older py2 versions
|
|
|
|
SyntaxError: ('invalid syntax', ('//usr/lib64/libreoffice/program//uno.py',
|
|
368, 77, " return _ConstantGroup({c.Name.split('.')[-1]:
|
|
c.ConstantValue for c in td.Constants})\n"))
|
|
|
|
Change-Id: Ie87c21fbfd83fc4d6f918eb55128db235c2220a8
|
|
---
|
|
pyuno/source/module/uno.py | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
|
|
index 4c78595..ad77ad3 100644
|
|
--- a/pyuno/source/module/uno.py
|
|
+++ b/pyuno/source/module/uno.py
|
|
@@ -361,7 +361,10 @@ def _impl_getConstantGroupByName( module, group ):
|
|
qualifiedName = module + '.' + group
|
|
for td in tde:
|
|
if td.Name == qualifiedName:
|
|
- return _ConstantGroup({c.Name.split('.')[-1]: c.ConstantValue for c in td.Constants})
|
|
+ return_dict = dict()
|
|
+ for c in td.Constants:
|
|
+ return_dict.update({c.Name.split('.')[-1]: c.ConstantValue})
|
|
+ return _ConstantGroup(return_dict)
|
|
else:
|
|
raise ValueError
|
|
|
|
--
|
|
2.7.2
|
|
|