MCPcopy Index your code
hub / github.com/beetbox/beets / edit

Function edit

beetsplug/edit.py:48–56  ·  view source on GitHub ↗

Open `filename` in a text editor.

(filename, log)

Source from the content-addressed store, hash-verified

46
47
48def 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
59def dump(arg):

Callers 1

edit_objectsMethod · 0.85

Calls 2

UserErrorClass · 0.90
debugMethod · 0.45

Tested by

no test coverage detected