summaryrefslogtreecommitdiffstats
path: root/editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'editor.py')
-rw-r--r--editor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor.py b/editor.py
index fcf16386..6319ada5 100644
--- a/editor.py
+++ b/editor.py
@@ -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.
61Tried to fall back to vi but terminal is dumb. Please configure at 61Tried to fall back to vi but terminal is dumb. Please configure at
62least one of these before using this command.""", file=sys.stderr) 62least 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')