summaryrefslogtreecommitdiff
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-13 09:58:42 -0700
committerTerry Jan Reedy <tjreedy@udel.edu>2019-05-13 12:58:42 -0400
commit68a11b6e6a73cd2e9b49e5df9973877b2fed6277 (patch)
tree3eac5cdc887e562fb0ad6dbae7cdf7cd2ddaa098 /Lib/idlelib
parent24482bd0ae203116fd7e41ec3219fb2857fb3ac7 (diff)
downloadcpython-git-68a11b6e6a73cd2e9b49e5df9973877b2fed6277.tar.gz
[3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (#13288)
Includes blurb fix in 85c69d5 (cherry picked from commit 4f098b35f58e911639f8e9adc393d5cf5c792e7f)
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/iomenu.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py
index f5bced597a..b9e813be06 100644
--- a/Lib/idlelib/iomenu.py
+++ b/Lib/idlelib/iomenu.py
@@ -384,6 +384,8 @@ class IOBinding:
try:
with open(filename, "wb") as f:
f.write(chars)
+ f.flush()
+ os.fsync(f.fileno())
return True
except OSError as msg:
tkMessageBox.showerror("I/O Error", str(msg),