--- a/eric6/UI/ErrorLogDialog.py Tue Oct 13 19:02:26 2020 +0200 +++ b/eric6/UI/ErrorLogDialog.py Wed Oct 14 17:50:39 2020 +0200 @@ -49,9 +49,8 @@ self.__logFile = logFile try: - f = open(logFile, "r", encoding="utf-8") - txt = f.read() - f.close() + with open(logFile, "r", encoding="utf-8") as f: + txt = f.read() self.logEdit.setPlainText(txt) except IOError: pass