Damn indents!

This commit is contained in:
Adrian Woodley
2019-07-23 02:17:32 +08:00
parent cd72f6cb7d
commit baf08f0001

View File

@@ -38,13 +38,11 @@ class INUeCommand():
reverse: bool = False reverse: bool = False
def __post_init__(self): def __post_init__(self):
print("Context %s" % self.context)
if self.reverse: if self.reverse:
self.position, self.value = self.value, self.position self.position, self.value = self.value, self.position
def get_context(self): def get_context(self):
"""Get the context of the command, ready to send.""" """Get the context of the command, ready to send."""
print (self.context)
return ("contextid %s\n" % self.context).encode('ascii') return ("contextid %s\n" % self.context).encode('ascii')
def get_command(self): def get_command(self):
@@ -105,7 +103,6 @@ class Worker(threading.Thread):
try: try:
with telnetlib.Telnet(inue, PORT) as telnet: with telnetlib.Telnet(inue, PORT) as telnet:
for slot in range(1, 10): for slot in range(1, 10):
print("Slot: %s" % slot)
if send_config(telnet, if send_config(telnet,
INUeCommand("Slot%s_I" % slot, "ceConfigBridgeStpMode")): INUeCommand("Slot%s_I" % slot, "ceConfigBridgeStpMode")):
rstp_dac = slot rstp_dac = slot
@@ -128,7 +125,7 @@ class Worker(threading.Thread):
if not send_config(telnet, command): if not send_config(telnet, command):
self.__failed.put(inue) self.__failed.put(inue)
fail = True fail = True
continue break
if fail: if fail:
continue continue