projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e7c96a
)
Made get_editor_string use contents and mtime to check for changes
author
Aaron Bentley
<abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 16:40:49 +0000
(16:40 +0000)
committer
Aaron Bentley
<abentley@panoramicfeedback.com>
Thu, 24 Mar 2005 16:40:49 +0000
(16:40 +0000)
libbe/utility.py
patch
|
blob
|
history
diff --git
a/libbe/utility.py
b/libbe/utility.py
index de5d2c58ee30d6f6a598972ca9b06c9a8a1cdfef..a39253831e4a55ebb47d81fc7158e1a5e5917dbd 100644
(file)
--- 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()