commit | a8421a128a2f0a5e6dcca7e37e36ceb63c9291c4 | [log] [tgz] |
---|---|---|
author | Shawn O. Pearce <sop@google.com> | Sat Apr 18 16:57:46 2009 -0700 |
committer | Shawn O. Pearce <sop@google.com> | Sat Apr 18 16:57:46 2009 -0700 |
tree | e1015c05e22d29ab23303bd88ba33c06f8631208 | |
parent | fb2316146f6e3036e0cc3e08653920964a428a15 [diff] |
Fix launching of editor under 'repo upload --replace' Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/editor.py b/editor.py index 34c9ad1..7400ba1 100644 --- a/editor.py +++ b/editor.py
@@ -78,11 +78,11 @@ if subprocess.Popen(editor + [path]).wait() != 0: raise EditorError() - fd = open(path) + fd2 = open(path) try: - return read() + return fd2.read() finally: - fd.close() + fd2.close() finally: if fd: os.close(fd)