Explorar o código

Fix launching of editor under 'repo upload --replace'

Signed-off-by: Shawn O. Pearce <sop@google.com>
Shawn O. Pearce %!s(int64=17) %!d(string=hai) anos
pai
achega
a8421a128a
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      editor.py

+ 3 - 3
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)