[utils] Modernize
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 2 Nov 2014 10:37:49 +0000 (11:37 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 2 Nov 2014 10:37:49 +0000 (11:37 +0100)
youtube_dl/utils.py

index 620c4fe8a154cf209d3aada650fd7f8db70e7a59..233286de840983142f4a89a5ea2cd3db6507fcae 100644 (file)
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
+from __future__ import unicode_literals
+
 import calendar
 import codecs
 import contextlib
@@ -1337,7 +1339,7 @@ def escape_rfc3986(s):
     """Escape non-ASCII characters as suggested by RFC 3986"""
     if sys.version_info < (3, 0) and isinstance(s, unicode):
         s = s.encode('utf-8')
-    return compat_urllib_parse.quote(s, "%/;:@&=+$,!~*'()?#[]")
+    return compat_urllib_parse.quote(s, b"%/;:@&=+$,!~*'()?#[]")
 
 
 def escape_url(url):