Create RealRunner and DebugRunner and Module Interface
This commit is contained in:
parent
e82aad8aaf
commit
e1e3549e53
18
CommandRunner.py
Normal file
18
CommandRunner.py
Normal 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
8
IModule.py
Normal file
@ -0,0 +1,8 @@
|
||||
class IModule(object):
|
||||
"""docstring for Module."""
|
||||
|
||||
def __init__(self):
|
||||
super(IModule, self).__init__()
|
||||
|
||||
def getCommand(self):
|
||||
raise NotImplementedError
|
Loading…
Reference in New Issue
Block a user