From a8421a128a2f0a5e6dcca7e37e36ceb63c9291c4 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 18 Apr 2009 16:57:46 -0700 Subject: [PATCH] Fix launching of editor under 'repo upload --replace' Signed-off-by: Shawn O. Pearce --- editor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor.py b/editor.py index 34c9ad1f..7400ba1a 100644 --- a/editor.py +++ b/editor.py @@ -78,11 +78,11 @@ least one of these before using this command.""" 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)