aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/newappend.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/newappend.py')
-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
import re
import subprocess
import sys
+import scriptutils
logger = logging.getLogger('recipetool')
@@ -96,12 +97,7 @@ def newappend(args):
return 1
if args.edit:
- editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi'))
- try:
- return subprocess.check_call([editor, append_path, recipe_path])
- except OSError as exc:
- logger.error("Execution of editor '%s' failed: %s", editor, exc)
- return 1
+ return scriptutils.run_editor([append_path, recipe_path])
else:
print(append_path)