diff --git a/build.py b/build.py index fa6fe29..e4b17d1 100644 --- a/build.py +++ b/build.py @@ -11,7 +11,7 @@ def convert_vba_script_to_xml(input_path, module_name, debug_mode): ''' xml_footer = '' - 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 @@ -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)) @@ -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()