def edit(filename, log): """Open `filename` in a text editor. """ cmd = util.shlex_split(util.editor_command()) cmd.append(filename) log.debug(u'invoking editor command: {!r}', cmd) try: subprocess.call(cmd) except OSError as exc: raise ui.UserError(u'could not run editor command {!r}: {}'.format( cmd[0], exc))
def edit(filename, log): """Open `filename` in a text editor. """ cmd = util.shlex_split(util.editor_command()) cmd.append(filename) log.debug(u'invoking editor command: {!r}', cmd) try: subprocess.call(cmd) except OSError as exc: raise ui.UserError(u'could not run editor command {!r}: {}'.format( cmd[0], exc ))
def edit(filename): """Open `filename` in a text editor. """ cmd = util.shlex_split(util.editor_command()) cmd.append(filename) subprocess.call(cmd)