From: Kurt B. Kaiser Date: Sun, 19 Mar 2006 22:12:03 +0000 (+0000) Subject: Source file f.flush() after writing; trying to avoid lossage if user X-Git-Tag: v2.4.3c1~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=210256e9bacadaeee1194047074cc1146da48806;p=thirdparty%2FPython%2Fcpython.git Source file f.flush() after writing; trying to avoid lossage if user kills GUI. Report from Bruce Sherwood. --- diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py index 4d6729235380..dd7e8da7a6ef 100644 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@ -374,6 +374,7 @@ class IOBinding: try: f = open(filename, "wb") f.write(chars) + f.flush() f.close() return True except IOError, msg: diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index c48b94577201..3dd53f226e61 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -1,3 +1,12 @@ +What's New in IDLE 1.1.3? +========================= + +*Release date: + +- Source file f.flush() after writing; trying to avoid lossage if user + kills GUI. Reported by Bruce Sherwood. + + What's New in IDLE 1.1.2? =========================