bin/gbuild-to-ide | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 0bd92e6314b799afec447c1e30260d9a8dfad894 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Sep 17 10:55:26 2020 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Sep 17 13:10:29 2020 +0200 make vim-ide-integration: fix ResourceWarning Exception ignored in: <_io.FileIO name='compile_commands.json' mode='wb' closefd=True> ResourceWarning: unclosed file <_io.TextIOWrapper name='compile_commands.json' mode='w' encoding='UTF-8'> Change-Id: I2ab4275a9b7897f5cd9e88b20a1eea4c68fe0d1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102907 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 7a6964abd454..bba9a9896b8a 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -548,8 +548,8 @@ class VimIntegrationGenerator(IdeIntegrationGenerator): entry = {'directory': lib.location, 'file': filePath, 'command': self.generateCommand(lib, filePath)} entries.append(entry) global_list.extend(entries) - export_file = open('compile_commands.json', 'w') - json.dump(global_list, export_file) + with open('compile_commands.json', 'w') as export_file: + json.dump(global_list, export_file) def generateCommand(self, lib, file): command = 'clang++ -Wall' _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits