diff options
| author | Shawn O. Pearce <sop@google.com> | 2009-04-18 16:57:46 -0700 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2009-04-18 16:57:46 -0700 |
| commit | a8421a128a2f0a5e6dcca7e37e36ceb63c9291c4 (patch) | |
| tree | e1015c05e22d29ab23303bd88ba33c06f8631208 | |
| parent | fb2316146f6e3036e0cc3e08653920964a428a15 (diff) | |
| download | git-repo-a8421a128a2f0a5e6dcca7e37e36ceb63c9291c4.tar.gz | |
Fix launching of editor under 'repo upload --replace'
Signed-off-by: Shawn O. Pearce <sop@google.com>
| -rw-r--r-- | editor.py | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -78,11 +78,11 @@ least one of these before using this command.""" | |||
| 78 | 78 | ||
| 79 | if subprocess.Popen(editor + [path]).wait() != 0: | 79 | if subprocess.Popen(editor + [path]).wait() != 0: |
| 80 | raise EditorError() | 80 | raise EditorError() |
| 81 | fd = open(path) | 81 | fd2 = open(path) |
| 82 | try: | 82 | try: |
| 83 | return read() | 83 | return fd2.read() |
| 84 | finally: | 84 | finally: |
| 85 | fd.close() | 85 | fd2.close() |
| 86 | finally: | 86 | finally: |
| 87 | if fd: | 87 | if fd: |
| 88 | os.close(fd) | 88 | os.close(fd) |
