summaryrefslogtreecommitdiff
path: root/update-error-constants.py
diff options
context:
space:
mode:
authorscoder <none@none>2008-01-11 15:20:44 +0100
committerscoder <none@none>2008-01-11 15:20:44 +0100
commitf5fd919e957cf8ffc884137b4aef0a47cbc66741 (patch)
tree6831a7abd6c2b2961dc130d4ff8164234340acf1 /update-error-constants.py
parent9dc851fe7196a4985a18ab87a856caf0fb31f5c8 (diff)
downloadpython-lxml-f5fd919e957cf8ffc884137b4aef0a47cbc66741.tar.gz
[svn r3163] r3241@delle: sbehnel | 2008-01-11 15:20:34 +0100lxml-2.0beta1
API usage fix --HG-- branch : trunk
Diffstat (limited to 'update-error-constants.py')
-rw-r--r--update-error-constants.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/update-error-constants.py b/update-error-constants.py
index 60117646..873c23d2 100644
--- a/update-error-constants.py
+++ b/update-error-constants.py
@@ -65,7 +65,8 @@ def parse_enums(html_file):
PARSE_ENUM_NAME = re.compile('\s*enum\s+(\w+)\s*{', re.I).match
PARSE_ENUM_VALUE = re.compile('\s*=\s+([0-9]+)\s*(?::\s*(.*))?').match
tree = etree.parse(html_file)
- xpath = etree.XPathEvaluator(tree, {'html' : 'http://www.w3.org/1999/xhtml'})
+ xpath = etree.XPathEvaluator(
+ tree, namespaces={'html' : 'http://www.w3.org/1999/xhtml'})
enum_dict = {}
enums = xpath.evaluate("//html:pre[@class = 'programlisting' and contains(text(), 'Enum') and html:a[@name]]")