diff options
| author | Joe Onorato <joeo@android.com> | 2008-11-14 21:12:44 -0500 |
|---|---|---|
| committer | Joe Onorato <joeo@android.com> | 2008-11-14 21:12:44 -0500 |
| commit | 8c6eef4713db36a2063dd5a68b3d37a5e4276508 (patch) | |
| tree | db9f821a6ba0c6d7e179eec9bc4b599bb01653d4 /editor.py | |
| parent | 34d237fbfbd87e8bb81063c23737e9b1ee4d5679 (diff) | |
| download | git-repo-8c6eef4713db36a2063dd5a68b3d37a5e4276508.tar.gz | |
Make repo's editor work when the editor is a commandline withv1.3.2
multiple args.
Diffstat (limited to 'editor.py')
| -rw-r--r-- | editor.py | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -69,14 +69,14 @@ least one of these before using this command.""" | |||
| 69 | Returns: | 69 | Returns: |
| 70 | new value of edited text; None if editing did not succeed | 70 | new value of edited text; None if editing did not succeed |
| 71 | """ | 71 | """ |
| 72 | editor = cls._GetEditor() | 72 | editor = cls._GetEditor().split() |
| 73 | fd, path = tempfile.mkstemp() | 73 | fd, path = tempfile.mkstemp() |
| 74 | try: | 74 | try: |
| 75 | os.write(fd, data) | 75 | os.write(fd, data) |
| 76 | os.close(fd) | 76 | os.close(fd) |
| 77 | fd = None | 77 | fd = None |
| 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 | return open(path).read() | 81 | return open(path).read() |
| 82 | finally: | 82 | finally: |
