summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool')
-rw-r--r--scripts/lib/recipetool/newappend.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/lib/recipetool/newappend.py b/scripts/lib/recipetool/newappend.py
index 5625a8ed52..bdf0693ec7 100644
--- a/scripts/lib/recipetool/newappend.py
+++ b/scripts/lib/recipetool/newappend.py
@@ -27,6 +27,7 @@ import os
27import re 27import re
28import subprocess 28import subprocess
29import sys 29import sys
30import scriptutils
30 31
31 32
32logger = logging.getLogger('recipetool') 33logger = logging.getLogger('recipetool')
@@ -96,12 +97,7 @@ def newappend(args):
96 return 1 97 return 1
97 98
98 if args.edit: 99 if args.edit:
99 editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi')) 100 return scriptutils.run_editor([append_path, recipe_path])
100 try:
101 return subprocess.check_call([editor, append_path, recipe_path])
102 except OSError as exc:
103 logger.error("Execution of editor '%s' failed: %s", editor, exc)
104 return 1
105 else: 101 else:
106 print(append_path) 102 print(append_path)
107 103