diff --git a/beets/util/__init__.py b/beets/util/__init__.py index b23832c6d..29b2a73e7 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -805,7 +805,8 @@ CommandOutput = namedtuple("CommandOutput", ("stdout", "stderr")) def command_output(cmd, shell=False): """Runs the command and returns its output after it has exited. - Returns a CommandOutput. + Returns a CommandOutput. The attributes ``stdout`` and ``stderr`` contain + byte strings of the respective output streams. ``cmd`` is a list of arguments starting with the command names. The arguments are bytes on Unix and strings on Windows. diff --git a/docs/changelog.rst b/docs/changelog.rst index c9fbc5fec..e0e19101b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -74,6 +74,9 @@ For plugin developers: is almost identical apart from the name change. Again, we'll re-export at the old location (with a deprecation warning) for backwards compatibility, but might stop doing this in a future release. +* ``beets.util.command_output`` now returns a named tuple of stdout and stderr + instead of only returning stdout. stdout can be accessed as a simple + attribute. For packagers: