Kaydet (Commit) a4c17041 authored tarafından Tomáš Chvátal's avatar Tomáš Chvátal Kaydeden (comit) Miklos Vajna

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
Reviewed-on: https://gerrit.libreoffice.org/22863Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst d7c4c45b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment