diff -r 3257703e10c5 -r 9978016560ec eric6/eric6.py --- a/eric6/eric6.py Tue Oct 13 19:02:26 2020 +0200 +++ b/eric6/eric6.py Wed Oct 14 17:50:39 2020 +0200 @@ -202,10 +202,9 @@ tbinfo] msg = '\n'.join(sections) try: - f = open(logFile, "w", encoding="utf-8") - f.write(msg) - f.write(versionInfo) - f.close() + with open(logFile, "w", encoding="utf-8") as f: + f.write(msg) + f.write(versionInfo) except IOError: pass