From 732e223357d43d736e5aedecb61a2fed3489509d Mon Sep 17 00:00:00 2001 From: "Rafael.Timmerberg" Date: Tue, 20 Aug 2013 03:06:08 +0200 Subject: [PATCH] added python --- lib/frontends/lish.py | 12 +++++++++++- linspector | 4 ---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/frontends/lish.py b/lib/frontends/lish.py index bd1b6e9..9fcf918 100644 --- a/lib/frontends/lish.py +++ b/lib/frontends/lish.py @@ -16,7 +16,7 @@ VERSION = "0.1" class LishFrontend(Frontend): def __init__(self, **kwargs): - print(kwargs) + #print(kwargs) #self.jobs = kwargs["jobs"] commander = LishCommander(kwargs) @@ -150,6 +150,16 @@ class LishCommander(Exit, ShellCommander, LogCommander): except KeyboardInterrupt, ke: pass + def do_python(self, text): + exec text + + def help_python(self): + print ''' + executes python using 'exec'. + ''' + + + def help_hostgroup(self): print ''' diff --git a/linspector b/linspector index 46c7436..22100c5 100755 --- a/linspector +++ b/linspector @@ -62,8 +62,6 @@ def main(): scheduler.start() jobs = [] - - for layout in linConf.get_enabled_layouts(): for hostgroup in layout.get_hostgroups(): for service in hostgroup.get_services(): @@ -81,8 +79,6 @@ def main(): log.d("shutting down scheduler") scheduler.shutdown(wait=False) - - elif args.action == "stop": log.i("stopping linspector is currently unsupported") elif args.action == "restart":