mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Fix launching of editor under 'repo upload --replace'
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
fb2316146f
commit
a8421a128a
@ -78,11 +78,11 @@ least one of these before using this command."""
|
|||||||
|
|
||||||
if subprocess.Popen(editor + [path]).wait() != 0:
|
if subprocess.Popen(editor + [path]).wait() != 0:
|
||||||
raise EditorError()
|
raise EditorError()
|
||||||
fd = open(path)
|
fd2 = open(path)
|
||||||
try:
|
try:
|
||||||
return read()
|
return fd2.read()
|
||||||
finally:
|
finally:
|
||||||
fd.close()
|
fd2.close()
|
||||||
finally:
|
finally:
|
||||||
if fd:
|
if fd:
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
|
Loading…
Reference in New Issue
Block a user