1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Cherry-pick from 13d9be4.

Refactor rpc.py and removed dependency on Exscript.
This commit is contained in:
Zach Moody
2016-06-18 00:15:36 -05:00
parent 10486f0a99
commit 5d4add119c
3 changed files with 87 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
from Exscript.protocols.Exception import LoginFailure
from getpass import getpass
from ncclient.transport.errors import AuthenticationError
from paramiko import AuthenticationException
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
@@ -96,7 +96,7 @@ class Command(BaseCommand):
inventory = rpc_client.get_inventory()
except KeyboardInterrupt:
raise
except (AuthenticationError, LoginFailure):
except (AuthenticationError, AuthenticationException):
self.stdout.write("Authentication error!")
continue
except Exception as e: