RefactoringRope/HelpDialog.py

changeset 341
c43844eb47b7
parent 326
67bcde9c65b9
child 345
622076fd58b6
diff -r 848ad8052585 -r c43844eb47b7 RefactoringRope/HelpDialog.py
--- a/RefactoringRope/HelpDialog.py	Sun Sep 20 11:10:02 2020 +0200
+++ b/RefactoringRope/HelpDialog.py	Wed Oct 14 19:11:31 2020 +0200
@@ -52,9 +52,8 @@
             self.helpEdit.setFontFamily("Monospace")
         
         try:
-            f = open(helpfile, "r", encoding="utf-8")
-            txt = f.read()
-            f.close()
+            with open(helpfile, "r", encoding="utf-8") as f:
+                txt = f.read()
             self.helpEdit.setPlainText(txt)
         except IOError as err:
             self.helpEdit.setPlainText(

eric ide

mercurial