This one makes PEP8 happy

pull/11/head
Thorsten Sick 3 years ago
parent 73f9af75da
commit 1616226105

@ -128,7 +128,7 @@ class SSHFeatures(BasePlugin):
try: try:
res = self.connection.put(src, dst) res = self.connection.put(src, dst)
except (paramiko.ssh_exception.SSHException, socket.timeout, UnexpectedExit): except (paramiko.ssh_exception.SSHException, socket.timeout, UnexpectedExit):
self.vprint(f"PUT Failed to connect", 1) self.vprint("PUT Failed to connect", 1)
do_retry = True do_retry = True
except paramiko.ssh_exception.NoValidConnectionsError as error: except paramiko.ssh_exception.NoValidConnectionsError as error:
self.vprint(f"No valid connection. Errors: {error.errors}", 1) self.vprint(f"No valid connection. Errors: {error.errors}", 1)

@ -187,14 +187,15 @@ class TestMachineConfig(unittest.TestCase):
def test_missing_vmip(self): def test_missing_vmip(self):
""" Testing if missing vm ip is handled""" """ Testing if missing vm ip is handled"""
vm_name = "target1"
mc = MachineConfig({"root": "systems/attacker1", mc = MachineConfig({"root": "systems/attacker1",
"os": "linux", "os": "linux",
"vm_controller": { "vm_controller": {
"type": "vagrant", "type": "vagrant",
"vagrantfilepath": "systems", "vagrantfilepath": "systems",
}, },
"vm_name": "target1"}) "vm_name": vm_name})
self.assertEqual(mc.vm_ip(), None) self.assertEqual(mc.vm_ip(), vm_name)
def test_machinepath(self): def test_machinepath(self):
""" Testing machinepath setting """ """ Testing machinepath setting """

Loading…
Cancel
Save