1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-20 21:27:52 +08:00

[utils] Apply 2.6 xpath craziness

This fixes ARD on 2.6
This commit is contained in:
Philipp Hagemeister 2014-09-13 09:11:14 +02:00
parent bf0ff93277
commit d74bebd502

View File

@ -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: