Merge branch 'master' of github.com:beetbox/beets

This commit is contained in:
Adrian Sampson 2016-06-28 20:41:14 -07:00
commit 10a47e98d0
2 changed files with 10 additions and 4 deletions

View file

@ -122,9 +122,12 @@ def _arg_encoding():
def decargs(arglist):
"""Given a list of command-line argument bytestrings, attempts to
decode them to Unicode strings.
decode them to Unicode strings when running under Python 2.
"""
return [s.decode(_arg_encoding()) for s in arglist]
if six.PY2:
return [s.decode(_arg_encoding()) for s in arglist]
else:
return arglist
def print_(*strings, **kwargs):
@ -211,7 +214,10 @@ def input_(prompt=None):
except EOFError:
raise UserError(u'stdin stream ended while input required')
return resp.decode(_in_encoding(), 'ignore')
if six.PY2:
return resp.decode(_in_encoding(), 'ignore')
else:
return resp
def input_options(options, require=False, prompt=None, fallback_prompt=None,

View file

@ -772,7 +772,7 @@ class TerminalImportSession(importer.ImportSession):
either an action constant or a TrackMatch object.
"""
print_()
print_(task.item.path)
print_(displayable_path(task.item.path))
candidates, rec = task.candidates, task.rec
# Take immediate action if appropriate.