mirror of
https://github.com/beetbox/beets.git
synced 2026-02-22 07:14:24 +01:00
fix crash when stdin comes from pipe w/o encoding
This allows, for example, "yes | beet convert".
This commit is contained in:
parent
6115fba765
commit
b81ac1d6e0
2 changed files with 2 additions and 1 deletions
|
|
@ -132,7 +132,7 @@ def input_(prompt=None):
|
|||
except EOFError:
|
||||
raise UserError('stdin stream ended while input required')
|
||||
|
||||
return resp.decode(sys.stdin.encoding, 'ignore')
|
||||
return resp.decode(sys.stdin.encoding or 'utf8', 'ignore')
|
||||
|
||||
def input_options(options, require=False, prompt=None, fallback_prompt=None,
|
||||
numrange=None, default=None, color=False, max_width=72):
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ Changelog
|
|||
non-ASCII extensions.
|
||||
* Fix for changing date fields (like "year") with the :ref:`modify-cmd`
|
||||
command.
|
||||
* Fix a crash when input is read from a pipe without a specified encoding.
|
||||
* Add a human-readable error message when writing files' tags fails.
|
||||
* Changed plugin loading so that modules can be imported without
|
||||
unintentionally loading the plugins they contain.
|
||||
|
|
|
|||
Loading…
Reference in a new issue