Skip to content

Commit

Permalink
Merge pull request #985 from rsmekala/fix-964
Browse files Browse the repository at this point in the history
Handled case where RPC may not exist for a given RPC.
  • Loading branch information
Nitin Kr authored Mar 5, 2020
2 parents 85afc67 + ef0f59d commit 74821f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/jnpr/junos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ def display_xml_rpc(self, command, format='xml'):
encode = None if sys.version < '3' else 'unicode'
return etree.tostring(rsp[0], encoding=encode)
return rsp[0]
except TypeError:
return "No RPC equivalent found for: " + command
except:
return "invalid command: " + command

Expand Down

0 comments on commit 74821f7

Please sign in to comment.