--- a/eric6/Plugins/VcsPlugins/vcsGit/ConfigurationPage/GitPage.py Tue Oct 13 19:02:26 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsGit/ConfigurationPage/GitPage.py Wed Oct 14 17:50:39 2020 +0200 @@ -94,11 +94,10 @@ firstName, lastName, email = ( "Firstname", "Lastname", "email_address") try: - f = open(cfgFile, "w") - f.write("[user]\n") - f.write(" name = {0} {1}\n".format(firstName, lastName)) - f.write(" email = {0}\n".format(email)) - f.close() + with open(cfgFile, "w") as f: + f.write("[user]\n") + f.write(" name = {0} {1}\n".format(firstName, lastName)) + f.write(" email = {0}\n".format(email)) except (IOError, OSError): # ignore these pass