Skip to content

Commit 828ceea

Browse files
author
Karthik Kumaravel
authored
Add err handling to responses
1 parent 2c5ba8e commit 828ceea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/cisco_grpc_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def getoper(self, path):
157157
for response in responses:
158158
objects += response.yangjson
159159
err += response.errors
160-
return objects
160+
return err, objects
161161

162162
def cliconfig(self, cli):
163163
"""Post of CLI config commands in text
@@ -198,7 +198,7 @@ def showcmdtextoutput(self, cli):
198198
for response in responses:
199199
objects += response.output
200200
err += response.errors
201-
return objects
201+
return err, objects
202202

203203
def showcmdjsonoutput(self, cli):
204204
""" Get of CLI show commands in json
@@ -214,4 +214,4 @@ def showcmdjsonoutput(self, cli):
214214
for response in responses:
215215
objects += response.jsonoutput
216216
err += response.errors
217-
return objects
217+
return err, objects

0 commit comments

Comments
 (0)