Skip to content

Commit

Permalink
Merge pull request #50 from abravetti/master
Browse files Browse the repository at this point in the history
use id(parentNode) instead of str(parentNode) as key
  • Loading branch information
chrisglass committed May 24, 2012
2 parents d815d0e + f9a7251 commit 9a57da1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xhtml2pdf/parser.py
Expand Up @@ -220,10 +220,9 @@ def CSSCollect(node, c):
#return node.cssAttrs
if c.css:

_key = "%s_%s" % (node.parentNode, node.attributes.items())
_key = "%s_%s" % (id(node.parentNode), node.attributes.items())
if hasattr(node.parentNode, "tagName"):
if node.parentNode.tagName.lower() != "html":
_key = "%s_%s" % (node.parentNode, node.attributes.items())
CachedCSSAttr = CSSAttrCache.get(_key, None)
if CachedCSSAttr is not None:
return CachedCSSAttr
Expand Down

0 comments on commit 9a57da1

Please sign in to comment.