Skip to content

Commit 2fbd662

Browse files
seriypspablohoffman
authored andcommitted
Speed-up libxml2 XPathSelector
1 parent 0a070f5 commit 2fbd662

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy/selector/libxml2sel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class XPathSelector(object_ref):
2121
__slots__ = ['doc', 'xmlNode', 'expr', '__weakref__']
2222

2323
def __init__(self, response=None, text=None, node=None, parent=None, expr=None):
24-
if parent:
24+
if parent is not None:
2525
self.doc = parent.doc
2626
self.xmlNode = node
2727
elif response:

0 commit comments

Comments
 (0)