From 55cef3aa1bf36ba39b1c62b61719a21c6d42b247 Mon Sep 17 00:00:00 2001 From: Adrian Woodley Date: Tue, 23 Jul 2019 00:13:28 +0800 Subject: [PATCH] Troublehsooting INUeCommand class --- aviat_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aviat_config.py b/aviat_config.py index 6acb2b9..527100e 100755 --- a/aviat_config.py +++ b/aviat_config.py @@ -43,6 +43,7 @@ class INUeCommand(): def get_context(self): """Get the context of the command, ready to send.""" + print ("contextid %s\n" % self.context).encode('ascii') return ("contextid %s\n" % self.context).encode('ascii') def get_command(self): @@ -67,8 +68,8 @@ def send_config(telnet, inue_command): response = telnet.read_until(b'\n').split() if response[0].decode() == inue_command.command: return response[-1] - - return False + else: + return False def commit_save(telnet): @@ -91,7 +92,6 @@ class Worker(threading.Thread): def run(self): while 1: inue = self.__inues.get() - print(inue) if inue is None: self.__passed.put(None) self.__failed.put(None)