diff --git a/napalm/junos/junos.py b/napalm/junos/junos.py index 10bdb3cd7..003ad116e 100644 --- a/napalm/junos/junos.py +++ b/napalm/junos/junos.py @@ -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): """ @@ -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 @@ -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