Commit 0026e02b authored by Nicolas Delaby's avatar Nicolas Delaby

Modify return value name to improve readability of code


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44737 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 011cd45f
......@@ -192,9 +192,10 @@ class Handler(object):
finally:
openoffice.release()
metadata = json.loads(decodestring(stdout))
if metadata.get("Data"):
self.document.reload(metadata['Data'])
if 'document_url' in metadata:
self.document.reload(metadata['document_url'])
metadata['Data'] = self.document.getContent()
del metadata['document_url']
self.document.trash()
return metadata
......
......@@ -337,7 +337,7 @@ def main():
output = encodestring(json.dumps(metadata_dict))
elif '--getmetadata' in param_list and '--convert' in param_list:
metadata_dict = unoconverter.getMetadata()
metadata_dict['Data'] = unoconverter.convert()
metadata_dict['document_url'] = unoconverter.convert()
output = encodestring(json.dumps(metadata_dict))
elif '--setmetadata' in param_list:
unoconverter.setMetadata(metadata)
......
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