From 159e24a14be709de789d65257f8b50124e535c30 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Tue, 28 Jun 2016 23:32:46 -0400 Subject: [PATCH] only decode decarg results on python 2 --- beets/ui/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index 807219b43..e9175fb7f 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -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):