[brightcove] fix on Python 2.6

This commit is contained in:
Philipp Hagemeister 2013-07-11 16:16:02 +02:00
parent df50a41289
commit 5de3ece225
2 changed files with 5 additions and 5 deletions

View file

@ -201,8 +201,8 @@ else:
if sys.version_info >= (2,7):
def find_xpath_attr(node, xpath, key, val):
""" Find the xpath xpath[@key=val] """
assert re.match(r'^[a-z]+$', key)
assert re.match(r'^[a-z]*$', val)
assert re.match(r'^[a-zA-Z]+$', key)
assert re.match(r'^[a-zA-Z@]*$', val)
expr = xpath + u"[@%s='%s']" % (key, val)
return node.find(expr)
else: