still working

This commit is contained in:
2019-06-24 17:15:47 +02:00
parent 44f82937d3
commit c30acfabdb

View File

@ -165,13 +165,13 @@ class CmdInterpreter(cmd.Cmd):
self.use_rawinput = False self.use_rawinput = False
def do_test(self, arg): def do_test(self, arg):
self.stdout.write("This is the test response") self.stdout.write("This is the test response\n\r")
def do_notify(self, arg): def do_notify(self, arg):
nf.notify() nf.notify()
def do_bye(self, arg): def do_bye(self, arg):
self.stdout.write("Bye!") self.stdout.write("Bye!\n\r")
return True return True
@ -180,6 +180,7 @@ class CmdHandle(socketserver.StreamRequestHandler):
cmd = CmdInterpreter(io.TextIOWrapper(self.rfile), io.TextIOWrapper(self.wfile)) cmd = CmdInterpreter(io.TextIOWrapper(self.rfile), io.TextIOWrapper(self.wfile))
try: try:
cmd.cmdloop() cmd.cmdloop()
print("Cmd handle terminated")
except ConnectionAbortedError as e: except ConnectionAbortedError as e:
print("Cmd handle externally interrupted") print("Cmd handle externally interrupted")