From 92b91c18780938283c505f5662c458e049bf3567 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Mon, 26 Nov 2012 04:23:20 +0100 Subject: Use character instead of byte strings --- youtube_dl/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 6f53337d4..658fd2686 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -26,6 +26,11 @@ std_headers = { 'Accept-Language': 'en-us,en;q=0.5', } +try: + compat_str = unicode # Python 2 +except NameError: + compat_str = str + def preferredencoding(): """Get preferred encoding. -- cgit v1.2.3