Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def convert_vba_script_to_xml(input_path, module_name, debug_mode):
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:language="StarBasic">'''
xml_footer = '</script:module>'
vba_script = file(input_path).read()
vba_script = open(input_path, 'r').read()
vba_script = vba_script.replace('${DEBUG_MODE}', debug_mode)
xml_script = xml_header + xml.sax.saxutils.escape(vba_script) + xml_footer
return xml_script
Expand All @@ -31,7 +31,7 @@ def convert_vba_script_to_xml(input_path, module_name, debug_mode):
for name in filenames:
file_path = dir_path + '/' + name
if name == 'description.xml':
description_content = file(file_path).read().replace('%PLUGIN_VERSION%', plugin_version)
description_content = open(file_path, 'r').read().replace('%PLUGIN_VERSION%', plugin_version)
extension_archive.writestr(name, description_content)
else:
extension_archive.write(file_path, os.path.relpath(file_path, EXTENSION_TEMPLATE_DIR))
Expand All @@ -52,7 +52,7 @@ def convert_vba_script_to_xml(input_path, module_name, debug_mode):
plugin_python_script = ''
python_sources = ['src/MendeleyHttpClient.py', 'src/MendeleyDesktopAPI.py']
for python_source_path in python_sources:
plugin_python_script += file(python_source_path).read()
plugin_python_script += open(python_source_path, 'r').read()
extension_archive.writestr('Scripts/MendeleyDesktopAPI.py', plugin_python_script)

extension_archive.close()
Expand Down