Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass on huge_tree to ncclient #975

Merged
merged 1 commit into from Nov 14, 2019
Merged

pass on huge_tree to ncclient #975

merged 1 commit into from Nov 14, 2019

Conversation

@vnitinv
Copy link
Contributor

vnitinv commented Nov 14, 2019

with huge_tree we used to get execpetion for big xml

  File "/Users/nitinkr/Coding/ncclient/ncclient/manager.py", line 236, in execute
    huge_tree=self._huge_tree).request(*args, **kwds)
  File "/Users/nitinkr/Coding/ncclient/ncclient/operations/third_party/juniper/rpc.py", line 52, in request
    return self._request(rpc)
  File "/Users/nitinkr/Coding/ncclient/ncclient/operations/rpc.py", line 338, in _request
    self._reply.parse()
  File "/Users/nitinkr/Coding/ncclient/ncclient/operations/rpc.py", line 148, in parse
    root = self._root = to_ele(self._raw, huge_tree=self._huge_tree) # The <rpc-reply> element
  File "/Users/nitinkr/Coding/ncclient/ncclient/xml_.py", line 124, in to_ele
    return x if etree.iselement(x) else etree.fromstring(x.encode('UTF-8'), parser=_get_parser(huge_tree))
  File "src/lxml/etree.pyx", line 3222, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1877, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1765, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
  File "<string>", line 105629
lxml.etree.XMLSyntaxError: xmlSAX2Characters: huge text node, line 105629, column 
@coveralls

This comment has been minimized.

Copy link

coveralls commented Nov 14, 2019

Coverage Status

Coverage increased (+0.01%) to 94.926% when pulling c6145cd on vnitinv:huge_tree into fdd6fdc on Juniper:master.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Nov 14, 2019

Coverage Status

Coverage decreased (-0.06%) to 94.856% when pulling c6145cd on vnitinv:huge_tree into fdd6fdc on Juniper:master.

@vnitinv vnitinv requested a review from dineshbaburam91 Nov 14, 2019
@vnitinv

This comment has been minimized.

Copy link
Contributor Author

vnitinv commented Nov 14, 2019

Copy link
Collaborator

dineshbaburam91 left a comment

Looks good

@vnitinv

This comment has been minimized.

Copy link
Contributor Author

vnitinv commented Nov 14, 2019

usage:

with Device(host=....., huge_tree=True) as dev:
    ----
@vnitinv vnitinv merged commit 0a88d6b into Juniper:master Nov 14, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.