eric6/UI/Browser.py

changeset 8205
4a0f1f896341
parent 8143
2c730d5fd177
child 8218
7c09585bd960
--- a/eric6/UI/Browser.py	Thu Apr 08 17:27:12 2021 +0200
+++ b/eric6/UI/Browser.py	Thu Apr 08 18:27:47 2021 +0200
@@ -909,8 +909,8 @@
                         .format(fname))
                 else:
                     try:
-                        f = open(filepath, "w")
-                        f.close()
+                        with open(filepath, "w"):
+                            pass
                     except OSError as err:
                         E5MessageBox.critical(
                             self,

eric ide

mercurial