--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Oct 13 19:02:26 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Wed Oct 14 17:50:39 2020 +0200 @@ -393,9 +393,8 @@ eol = e5App().getObject("Project").getEolString() try: - f = open(fname, "w", encoding="utf-8", newline="") - f.write(eol.join(self.contents.toPlainText().splitlines())) - f.close() + with open(fname, "w", encoding="utf-8", newline="") as f: + f.write(eol.join(self.contents.toPlainText().splitlines())) except IOError as why: E5MessageBox.critical( self, self.tr('Save Diff'),