Skip to content

Conversation

@NilashishC
Copy link
Contributor

Signed-off-by: NilashishC [email protected]

SUMMARY

Fixes #306

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

restconf_get.py

@NilashishC NilashishC requested a review from Qalthos July 21, 2021 14:14
def handle_response(response, response_data):
try:
response_data = json.loads(response_data.read())
res = response_data.read().strip()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
res = response_data.read().strip()
res = response_data.read().strip()
try:

(It won't let me remove the try above, but you get the idea)

The reason it's split into response and response_data is that the latter is a buffer containing the read-once data from the former, so you should be able to response_data.seek(0) and get the same result. But this is just fine, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restconf_get on nxos shows no output, however, shows all green but works fine for iosxe

2 participants