mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 03:52:51 +01:00
only decode decarg results on python 2
This commit is contained in:
parent
5d4e3396d2
commit
159e24a14b
1 changed files with 5 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue