From 4f1f8840a9c842efd09e7516e09f47f8e44ed844 Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Thu, 24 Mar 2005 16:40:49 +0000 Subject: [PATCH] Made get_editor_string use contents and mtime to check for changes --- libbe/utility.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libbe/utility.py b/libbe/utility.py index de5d2c5..a392538 100644 --- a/libbe/utility.py +++ b/libbe/utility.py @@ -91,7 +91,8 @@ def editor_string(): os.close(fhandle) oldmtime = os.path.getmtime(fname) os.system("%s %s" % (editor, fname)) - if oldmtime == os.path.getmtime(fname): + if oldmtime == os.path.getmtime(fname) and\ + file(fname, "rb").read() == "": output = None else: output = file(fname, "rb").read() -- 2.26.2