--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnUtilities.py Tue Oct 13 19:02:26 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnUtilities.py Wed Oct 14 17:50:39 2020 +0200 @@ -52,9 +52,8 @@ except OSError: pass try: - f = open(config, "w") - f.write(DefaultConfig) - f.close() + with open(config, "w") as f: + f.write(DefaultConfig) except IOError: pass @@ -65,9 +64,8 @@ """ config = getConfigPath() try: - f = open(config, "r") - configList = f.read().splitlines() - f.close() + with open(config, "r") as f: + configList = f.read().splitlines() except IOError: return @@ -103,8 +101,7 @@ if newConfig != configList: try: - f = open(config, "w") - f.write("\n".join(newConfig)) - f.close() + with open(config, "w") as f: + f.write("\n".join(newConfig)) except IOError: pass