From 2886f0708ea3ee1d46bae925e1df7cef20aae35d Mon Sep 17 00:00:00 2001 From: jakob Date: Wed, 21 Aug 2019 12:33:01 +0200 Subject: [PATCH] Show repl usage on wrong command --- atmorepl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/atmorepl.py b/atmorepl.py index 38301fa..a14d117 100644 --- a/atmorepl.py +++ b/atmorepl.py @@ -51,7 +51,11 @@ class AtmoClientHandler(socketserver.StreamRequestHandler): self.send("Bye") else: raise CommandNotFound(cmd) - except (CommandNotFound, WrongArgumentCount) as e: + except CommandNotFound as e: + self.send("Error: {}".format(e)) + self.send("The following commands are available: ") + self.send(" reload") + except WrongArgumentCount as e: self.send("Error: {}".format(e)) @staticmethod