diff options
-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: |