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

<exception>.message is no longer a thing in Python3 #1016

Merged
merged 2 commits into from
Jul 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions napalm/junos/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _unlock(self):
self.device.cu.unlock()
self.locked = False
except JnrpUnlockError as jue:
raise UnlockError(jue.messsage)
raise UnlockError(jue)

def _rpc(self, get, child=None, **kwargs):
"""
Expand Down Expand Up @@ -818,7 +818,7 @@ def get_lldp_neighbors_detail(self, interface=""):
interface_args = {interface_variable: interface}
lldp_table.get(**interface_args)
except RpcError as e:
if "syntax error" in e.message:
if "syntax error" in str(e):
# Looks like we need to call a different RPC on this device
# Switch to the alternate style
lldp_table.GET_RPC = alt_rpc
Expand Down Expand Up @@ -1571,7 +1571,7 @@ def get_mac_address_table(self):
except RpcError as e:
# Device hasn't got it's l2 subsystem running
# Don't error but just return an empty result
if "l2-learning subsystem" in e.message:
if "l2-learning subsystem" in str(e):
return []
else:
raise
Expand Down