From 5488eaf223da12b7e341b080d6f2bb5193cad839 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 26 Oct 2016 22:19:07 +0200 Subject: [PATCH] python3 decode --- pandora/archive/external.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/archive/external.py b/pandora/archive/external.py index 65f82b94..b3bfce7e 100644 --- a/pandora/archive/external.py +++ b/pandora/archive/external.py @@ -93,7 +93,9 @@ def download(item_id, url): return '%s contains no videos' % url media = info[0] cdir = os.path.abspath(os.curdir) - tmp = tempfile.mkdtemp().decode('utf-8') + tmp = tempfile.mkdtemp() + if isinstance(tmp, bytes): + tmp = tmp.decode('utf-8') os.chdir(tmp) cmd = ['youtube-dl', '-q', media['url']] p = subprocess.Popen(cmd,