diff options
Diffstat (limited to 'editor.py')
| -rw-r--r-- | editor.py | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -57,7 +57,7 @@ class Editor(object): | |||
| 57 | 57 | ||
| 58 | if os.getenv('TERM') == 'dumb': | 58 | if os.getenv('TERM') == 'dumb': |
| 59 | print( | 59 | print( |
| 60 | """No editor specified in GIT_EDITOR, core.editor, VISUAL or EDITOR. | 60 | """No editor specified in GIT_EDITOR, core.editor, VISUAL or EDITOR. |
| 61 | Tried to fall back to vi but terminal is dumb. Please configure at | 61 | Tried to fall back to vi but terminal is dumb. Please configure at |
| 62 | least one of these before using this command.""", file=sys.stderr) | 62 | least one of these before using this command.""", file=sys.stderr) |
| 63 | sys.exit(1) | 63 | sys.exit(1) |
| @@ -104,10 +104,10 @@ least one of these before using this command.""", file=sys.stderr) | |||
| 104 | rc = subprocess.Popen(args, shell=shell).wait() | 104 | rc = subprocess.Popen(args, shell=shell).wait() |
| 105 | except OSError as e: | 105 | except OSError as e: |
| 106 | raise EditorError('editor failed, %s: %s %s' | 106 | raise EditorError('editor failed, %s: %s %s' |
| 107 | % (str(e), editor, path)) | 107 | % (str(e), editor, path)) |
| 108 | if rc != 0: | 108 | if rc != 0: |
| 109 | raise EditorError('editor failed with exit status %d: %s %s' | 109 | raise EditorError('editor failed with exit status %d: %s %s' |
| 110 | % (rc, editor, path)) | 110 | % (rc, editor, path)) |
| 111 | 111 | ||
| 112 | with open(path, mode='rb') as fd2: | 112 | with open(path, mode='rb') as fd2: |
| 113 | return fd2.read().decode('utf-8') | 113 | return fd2.read().decode('utf-8') |
