From f1de371d373a3f5cfe0ea010fd1f10b036ba4b39 Mon Sep 17 00:00:00 2001 From: Pieprzycki Piotr Date: Wed, 21 Dec 2016 13:51:52 +0100 Subject: [PATCH] fixes for pylama --- napalm_vyos/vyos.py | 10 +++++----- test/unit/conftest.py | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/napalm_vyos/vyos.py b/napalm_vyos/vyos.py index ac96390..7b3a5bc 100644 --- a/napalm_vyos/vyos.py +++ b/napalm_vyos/vyos.py @@ -92,10 +92,10 @@ class VyOSDriver(NetworkDriver): def open(self): self.device = ConnectHandler(device_type='vyos', - host=self._hostname, - username=self._username, - password=self._password, - **self.netmiko_optional_args) + host=self._hostname, + username=self._username, + password=self._password, + **self.netmiko_optional_args) try: self._scp_client = SCPConn(self.device) @@ -143,7 +143,7 @@ class VyOSDriver(NetworkDriver): if os.path.exists(filename) is True: with open(filename) as f: self.device.send_command("cp "+self._BOOT_FILENAME+" " - + self._BACKUP_FILENAME) + + self._BACKUP_FILENAME) self._new_config = f.read() cfg = [x for x in self._new_config.split("\n") if x is not ""] output_loadcmd = self.device.send_config_set(cfg) diff --git a/test/unit/conftest.py b/test/unit/conftest.py index 0a5b115..a81ab39 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -37,7 +37,6 @@ class PatchedVyOSDriver(vyos.VyOSDriver): self.patched_attrs = ['device'] self.device = FakeVyOSDevice() - #self._device = FakeVyOSDevice() def close(self): pass @@ -54,8 +53,6 @@ class PatchedVyOSDriver(vyos.VyOSDriver): class FakeVyOSDevice(BaseTestDouble): """VyOS device test double.""" - - def send_command(self, command, **kwargs): filename = '{}.text'.format(self.sanitize_text(command)) print filename