diff options
Diffstat (limited to 'scripts/lib/devtool/utilcmds.py')
| -rw-r--r-- | scripts/lib/devtool/utilcmds.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/scripts/lib/devtool/utilcmds.py b/scripts/lib/devtool/utilcmds.py index a8f5e97833..18eddb78b0 100644 --- a/scripts/lib/devtool/utilcmds.py +++ b/scripts/lib/devtool/utilcmds.py | |||
| @@ -24,6 +24,7 @@ import tempfile | |||
| 24 | import logging | 24 | import logging |
| 25 | import argparse | 25 | import argparse |
| 26 | import subprocess | 26 | import subprocess |
| 27 | import scriptutils | ||
| 27 | from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, DevtoolError | 28 | from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, DevtoolError |
| 28 | from devtool import parse_recipe | 29 | from devtool import parse_recipe |
| 29 | 30 | ||
| @@ -48,17 +49,7 @@ def edit_recipe(args, config, basepath, workspace): | |||
| 48 | raise DevtoolError("Recipe file for %s is not under the workspace" % | 49 | raise DevtoolError("Recipe file for %s is not under the workspace" % |
| 49 | args.recipename) | 50 | args.recipename) |
| 50 | 51 | ||
| 51 | editor = os.environ.get('EDITOR', None) | 52 | return scriptutils.run_editor(recipefile) |
| 52 | if not editor: | ||
| 53 | raise DevtoolError("EDITOR environment variable not set") | ||
| 54 | |||
| 55 | import subprocess | ||
| 56 | try: | ||
| 57 | subprocess.check_call('%s "%s"' % (editor, recipefile), shell=True) | ||
| 58 | except subprocess.CalledProcessError as e: | ||
| 59 | return e.returncode | ||
| 60 | |||
| 61 | return 0 | ||
| 62 | 53 | ||
| 63 | 54 | ||
| 64 | def configure_help(args, config, basepath, workspace): | 55 | def configure_help(args, config, basepath, workspace): |
