h***@public.gmane.org
2012-06-01 00:32:14 UTC
Status: New
Owner: ----
New issue 208 by andreabr...-***@public.gmane.org: html5lib is incompatible with
python 2.4
http://code.google.com/p/html5lib/issues/detail?id=208
What steps will reproduce the problem?
install html5lib with python 2.4 and use it...
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "xxx.py", line 10, in ?
import html5lib
File "/usr/lib/python2.4/site-packages/html5lib-0.95-py2.4.egg/html5lib/__init__.py",
line 14, in ?
from html5parser import HTMLParser, parse, parseFragment
File "/usr/lib/python2.4/site-packages/html5lib-0.95-py2.4.egg/html5lib/html5parser.py",
line 179
currentNode = self.tree.openElements[-1] if self.tree.openElements else
None
^
SyntaxError: invalid syntax
Please provide any additional information below.
replace 179-181 with:
if self.tree.openElements:
currentNode = self.tree.openElements[-1]
else:
currentNode = None
if currentNode:
currentNodeNamespace = currentNode.namespace
else:
currentNodeNamespace = None
if currentNode:
currentNodeName = currentNode.name
else:
currentNodeName = None
Owner: ----
New issue 208 by andreabr...-***@public.gmane.org: html5lib is incompatible with
python 2.4
http://code.google.com/p/html5lib/issues/detail?id=208
What steps will reproduce the problem?
install html5lib with python 2.4 and use it...
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "xxx.py", line 10, in ?
import html5lib
File "/usr/lib/python2.4/site-packages/html5lib-0.95-py2.4.egg/html5lib/__init__.py",
line 14, in ?
from html5parser import HTMLParser, parse, parseFragment
File "/usr/lib/python2.4/site-packages/html5lib-0.95-py2.4.egg/html5lib/html5parser.py",
line 179
currentNode = self.tree.openElements[-1] if self.tree.openElements else
None
^
SyntaxError: invalid syntax
Please provide any additional information below.
replace 179-181 with:
if self.tree.openElements:
currentNode = self.tree.openElements[-1]
else:
currentNode = None
if currentNode:
currentNodeNamespace = currentNode.namespace
else:
currentNodeNamespace = None
if currentNode:
currentNodeName = currentNode.name
else:
currentNodeName = None
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.