Create RealRunner and DebugRunner and Module Interface

This commit is contained in:
Marcel Schwarz 2019-12-14 04:11:12 +01:00
parent e82aad8aaf
commit e1e3549e53
2 changed files with 26 additions and 0 deletions

18
CommandRunner.py Normal file
View File

@ -0,0 +1,18 @@
class CommandRunner(object):
"""docstring for CommandRunner."""
def __init__(self):
super(CommandRunner).__init__()
def run(self, module):
print("REAL RUNNER")
print("Commands should be executed as subprocess.")
class CommandRunnerDebug(object):
def __init__(self):
super(CommandRunnerDebug).__init__()
def run(self, module):
print("DEBUG RUNNER")
print(module.getCommand())

8
IModule.py Normal file
View File

@ -0,0 +1,8 @@
class IModule(object):
"""docstring for Module."""
def __init__(self):
super(IModule, self).__init__()
def getCommand(self):
raise NotImplementedError