aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libbe/utility.py3
1 files changed, 2 insertions, 1 deletions
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()