Open `filename` in a text editor.
(filename, log)
| 46 | |
| 47 | |
| 48 | def edit(filename, log): |
| 49 | """Open `filename` in a text editor.""" |
| 50 | cmd = shlex.split(util.editor_command()) |
| 51 | cmd.append(filename) |
| 52 | log.debug("invoking editor command: {!r}", cmd) |
| 53 | try: |
| 54 | subprocess.call(cmd) |
| 55 | except OSError as exc: |
| 56 | raise UserError(f"could not run editor command {cmd[0]!r}: {exc}") |
| 57 | |
| 58 | |
| 59 | def dump(arg): |
no test coverage detected