aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-09-13 09:11:14 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-09-13 09:11:14 +0200
commitd74bebd50263a2f744595b9a54825914bc07657b (patch)
tree47d95bfc5a1abfc0561cc83d460edda4d161ce37 /youtube_dl/utils.py
parentbf0ff93277ba36fbda70223ca7e78b5132e54ddf (diff)
[utils] Apply 2.6 xpath craziness
This fixes ARD on 2.6
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 7536b3b36..247788078 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -305,6 +305,9 @@ def xpath_with_ns(path, ns_map):
def xpath_text(node, xpath, name=None, fatal=False):
+ if sys.version_info < (2, 7): # Crazy 2.6
+ xpath = xpath.encode('ascii')
+
n = node.find(xpath)
if n is None:
if fatal: