diff options
author | Tomáš Chvátal <tchvatal@suse.com> | 2016-03-03 13:55:34 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-04 11:45:14 +0000 |
commit | a4c17041271eca2181cf11e5a0b59f4001c20cee (patch) | |
tree | 9962368b9ccfb34b41cb040abd621af5831dea2d /pyuno | |
parent | d7c4c45bc8daa9e3dffe2d5d6557c250f1d683c0 (diff) |
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/22863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/uno.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py index a899c7050f59..1526aac9d8df 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 |