chiark
/
gitweb
/
~mdw
/
stgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9ee0285
)
Simplify editor selection logic
author
Karl Hasselström
<kha@treskal.com>
Mon, 28 Jan 2008 20:19:34 +0000
(21:19 +0100)
committer
Karl Hasselström
<kha@treskal.com>
Tue, 29 Jan 2008 03:26:13 +0000
(
04:26
+0100)
Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/utils.py
patch
|
blob
|
blame
|
history
diff --git
a/stgit/utils.py
b/stgit/utils.py
index 00776b021f37ce1b95576b90d4170c355942b842..43366c92a84d4171eac28d3cc054fb5d4d1545c4 100644
(file)
--- a/
stgit/utils.py
+++ b/
stgit/utils.py
@@
-175,12
+175,8
@@
def call_editor(filename):
# the editor
editor = config.get('stgit.editor')
- if editor:
- pass
- elif 'EDITOR' in os.environ:
- editor = os.environ['EDITOR']
- else:
- editor = 'vi'
+ if not editor:
+ editor = os.environ.get('EDITOR', 'vi')
editor += ' %s' % filename
out.start('Invoking the editor: "%s"' % editor)