From 1cf238708fe2872cefc03b9d9b4c529619a11423 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 21 Oct 2015 16:44:09 -0400 Subject: [PATCH] Amend console API The console API had a 'wait_for_data' which will never be used. Also change __init__() so that it can be called via super() to allow working around IDE complaints. --- confluent_server/confluent/interface/console.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/confluent_server/confluent/interface/console.py b/confluent_server/confluent/interface/console.py index 4475d4ec..df0ef255 100644 --- a/confluent_server/confluent/interface/console.py +++ b/confluent_server/confluent/interface/console.py @@ -28,7 +28,7 @@ class Console(object): """This is the class defining the interface a console plugin must return for the _console/session element""" def __init__(self, node, config): - raise NotImplementedError("Subclassing required") + return def connect(self, callback): raise NotImplementedError("Subclassing required") @@ -36,13 +36,10 @@ class Console(object): def write(self, data): raise NotImplementedError("Subclassing required") - def wait_for_data(self, timeout=600): - raise NotImplementedError("Subclassing required") - def send_break(self): """This function is how a plugin should implement sending a break to the remote console""" - pass + return def ping(self): """This function is a hint to the console plugin that now would be a @@ -54,4 +51,4 @@ class Console(object): as well, so consoles can schedule a health check to run at this time. No return is expected, any error condition can be reported by sending ConsoleEvent.Disconnect, just like normal.""" - pass + return