diff options
-rwxr-xr-x | bin/gbuild-to-ide | 4 |
1 files changed, 2 insertions, 2 deletions
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' |