aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-11-26 04:23:20 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2012-11-26 04:23:20 +0100
commit92b91c18780938283c505f5662c458e049bf3567 (patch)
tree8d91ceb8131b4698583704ca62ff77ae35a61779 /youtube_dl/utils.py
parent7ec1a206eaedcb35c16ba54289d3c7f92baa59ce (diff)
Use character instead of byte strings
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py5
1 files changed, 5 insertions, 0 deletions
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.